Browse Source

页面所有操作加上加载中状态

chenrui 3 năm trước cách đây
mục cha
commit
496fe0969b
43 tập tin đã thay đổi với 2902 bổ sung3054 xóa
  1. 0 48
      src/api/custType.js
  2. 0 73
      src/api/customer.js
  3. 50 43
      src/views/allocationManagement/transferOut/basicInfoModal.vue
  4. 52 47
      src/views/allocationManagement/transferOut/detail.vue
  5. 160 140
      src/views/allocationManagement/transferOut/edit.vue
  6. 32 25
      src/views/basicData/transferTypeManagement/editModal.vue
  7. 28 23
      src/views/basicData/warehouse/editModal.vue
  8. 32 27
      src/views/basicData/warehouse/storingLocation/editModal.vue
  9. 0 340
      src/views/customerManagement/customerInfo/edit.vue
  10. 39 32
      src/views/dealerManagement/dealerAccountManagement/editModal.vue
  11. 26 19
      src/views/dealerManagement/dealerRelationshipBinding/associateModal.vue
  12. 54 47
      src/views/dealerManagement/marketingDivisionSet/editModal.vue
  13. 372 364
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  14. 37 29
      src/views/dealerManagement/merchantInfoManagement/updateCooperate.vue
  15. 25 18
      src/views/dealerManagement/merchantInfoManagement/updateDealerLevel.vue
  16. 26 19
      src/views/dealerManagement/rebateSettings/associateModal.vue
  17. 25 19
      src/views/power/role/menuModal.vue
  18. 54 49
      src/views/power/role/roleModal.vue
  19. 25 18
      src/views/power/user/updateAreal.vue
  20. 94 89
      src/views/power/user/userModal.vue
  21. 49 42
      src/views/productManagement/productBrand/editModal.vue
  22. 32 25
      src/views/productManagement/productCategory/editModal.vue
  23. 207 200
      src/views/productManagement/productInfo/edit.vue
  24. 57 50
      src/views/productManagement/productInfo/offlineModal.vue
  25. 29 22
      src/views/productManagement/productLevel/editModal.vue
  26. 41 35
      src/views/productManagement/productPricing/auditModal.vue
  27. 88 81
      src/views/productManagement/productPricing/editModal.vue
  28. 107 100
      src/views/promotionRulesManagement/promotionRules/basicInfoModal.vue
  29. 3 1
      src/views/promotionRulesManagement/promotionRules/editRuleModal.vue
  30. 55 48
      src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue
  31. 69 62
      src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue
  32. 40 35
      src/views/salesManagement/backorder/detailModal.vue
  33. 82 77
      src/views/salesManagement/pushOrderManagement/detail.vue
  34. 62 55
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  35. 136 119
      src/views/salesManagement/salesQuery/edit.vue
  36. 54 47
      src/views/salesManagement/salesReturn/chooseCustomModal.vue
  37. 48 39
      src/views/salesManagement/salesReturn/salesReturnCheck.vue
  38. 70 62
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  39. 70 60
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  40. 110 85
      src/views/salesManagement/waitDispatch/edit.vue
  41. 72 65
      src/views/setting/noticeManagement/editModal.vue
  42. 38 31
      src/views/supplierManagement/associatedProduct/settingCost.vue
  43. 252 244
      src/views/supplierManagement/supplierInfo/edit.vue

+ 0 - 48
src/api/custType.js

@@ -1,48 +0,0 @@
-import { axios } from '@/utils/request'
-
-//  客户类型列表  分页
-export const custTypeList = (params) => {
-  const url = `/custType/queryPage/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-//  客户类型列表  不分页
-export const custTypeAllList = (params) => {
-  return axios({
-    url: `/custType/queryList`,
-    data: {},
-    method: 'post'
-  })
-}
-//  客户类型列表  下拉
-export const custTypeFindAllList = (params) => {
-  return axios({
-    url: `/custType/findAll`,
-    data: {},
-    method: 'post'
-  })
-}
-
-// 新增/编辑客户类型
-export const custTypeSave = params => {
-  return axios({
-    url: '/custType/save',
-    data: params,
-    method: 'post'
-  })
-}
-
-// 删除客户类型
-export const custTypeDel = params => {
-  return axios({
-    url: `/custType/delete/${params.id}`,
-    data: {},
-    method: 'get'
-  })
-}

+ 0 - 73
src/api/customer.js

@@ -1,73 +0,0 @@
-import { axios } from '@/utils/request'
-
-//  客户列表  分页
-export const custList = (params) => {
-  const url = `/cust/queryPage/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-//  客户列表  不分页
-export const custAllList = (params) => {
-  return axios({
-    url: `/cust/queryList`,
-    data: {},
-    method: 'post'
-  })
-}
-// 新增/编辑客户
-export const custSave = params => {
-  return axios({
-    url: '/cust/save',
-    data: params,
-    method: 'post'
-  })
-}
-
-// 根据sn修改客户信息
-export const updateByCustomerSn = params => {
-  return axios({
-    url: '/cust/updateByCustomerSn',
-    data: params,
-    method: 'post'
-  })
-}
-
-// 客户详情
-export const custFindById = params => {
-  return axios({
-    url: `/cust/findById/${params.id}`,
-    data: {},
-    method: 'get'
-  })
-}
-
-// 删除客户
-export const custDel = params => {
-  return axios({
-    url: `/cust/delete/${params.id}`,
-    data: {},
-    method: 'get'
-  })
-}
-//  收款方式  下拉
-export const settleStyleFindAllList = (params) => {
-  return axios({
-    url: `/settleStyle/findAll`,
-    data: {},
-    method: 'post'
-  })
-}
-
-// 启用禁用
-export const updateEnableStatus = params => {
-  return axios({
-    url: `/cust/enable/${params.id}/${params.flag}`,
-    data: {},
-    method: 'get'
-  })
-}

+ 50 - 43
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -8,49 +8,51 @@
     v-model="isShow"
     @cancle="isShow = false"
     :width="800">
-    <a-form-model
-      id="allocateBill-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-form-model-item label="调往对象" prop="targetType">
-        <a-radio-group v-model="form.targetType" @change="targetTypeChange">
-          <a-radio v-for="(item,index) in targetTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
-        </a-radio-group>
-      </a-form-model-item>
-      <a-form-model-item label="调往对象名称" :prop="isDealer ? 'targetSn' : 'targetName'">
-        <a-select
-          v-if="isDealer"
-          show-search
-          id="allocateBill-basicInfo-dealerName"
-          v-model="form.targetSn"
-          placeholder="请选择"
-          :filter-option="false"
-          :not-found-content="fetching ? undefined : null"
-          @search="fetchUser"
-          @change="handleChange"
-        >
-          <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-          <a-select-option v-for="item in dealerData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
-        </a-select>
-        <a-input v-if="!isDealer" v-model="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
-      </a-form-model-item>
-      <a-form-model-item label="调拨类型" prop="allocateTypeSn">
-        <a-select id="allocateBill-basicInfo-allocateTypeSn" v-model="form.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
-          <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="备注" prop="remark">
-        <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="allocateBill-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="allocateBill-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="allocateBill-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="调往对象" prop="targetType">
+          <a-radio-group v-model="form.targetType" @change="targetTypeChange">
+            <a-radio v-for="(item,index) in targetTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item label="调往对象名称" :prop="isDealer ? 'targetSn' : 'targetName'">
+          <a-select
+            v-if="isDealer"
+            show-search
+            id="allocateBill-basicInfo-dealerName"
+            v-model="form.targetSn"
+            placeholder="请选择"
+            :filter-option="false"
+            :not-found-content="fetching ? undefined : null"
+            @search="fetchUser"
+            @change="handleChange"
+          >
+            <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+            <a-select-option v-for="item in dealerData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+          </a-select>
+          <a-input v-if="!isDealer" v-model="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
+        </a-form-model-item>
+        <a-form-model-item label="调拨类型" prop="allocateTypeSn">
+          <a-select id="allocateBill-basicInfo-allocateTypeSn" v-model="form.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
+            <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remark">
+          <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="allocateBill-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="allocateBill-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -75,6 +77,7 @@ export default {
     this.fetchUser = debounce(this.fetchUser, 800)
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 20 }
@@ -130,13 +133,17 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
+          _this.spinning = true
           allocateBillSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.isShow = false
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 52 - 47
src/views/allocationManagement/transferOut/detail.vue

@@ -1,53 +1,55 @@
 <template>
   <div class="allocateBillDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="allocateBillDetail-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="allocateBillDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <a-button
-          v-if="isEdit"
-          type="primary"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="allocateBillDetail-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="allocateBillDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="isEdit"
+            type="primary"
+            size="small"
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="allocateBillDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-button key="2" id="allocateBillDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="allocateBillDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.allocateTypeName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
+        <!-- 总计 -->
+        <a-alert type="info" showIcon style="margin-bottom:15px">
+          <div slot="message">总数量:<strong>{{ (productTotal&&productTotal.totalQty) || 0 }}</strong> ,总成本(¥):<strong>{{ (productTotal&&productTotal.totalCost) || 0 }}</strong> ,总售价(¥):<strong>{{ (productTotal&&productTotal.totalPrice) || 0 }}</strong></div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
           size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="allocateBillDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-button key="2" id="allocateBillDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="allocateBillDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.allocateTypeName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">总数量:<strong>{{ (productTotal&&productTotal.totalQty) || 0 }}</strong> ,总成本(¥):<strong>{{ (productTotal&&productTotal.totalCost) || 0 }}</strong> ,总售价(¥):<strong>{{ (productTotal&&productTotal.totalPrice) || 0 }}</strong></div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1335 }"
-        bordered>
-      </s-table>
-    </a-card>
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1335 }"
+          bordered>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -61,6 +63,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -131,7 +134,9 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
+      _this.spinning = true
       allocateBillDetailPrint({ sn: this.$route.params.sn }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 160 - 140
src/views/allocationManagement/transferOut/edit.vue

@@ -1,145 +1,147 @@
 <template>
   <div class="allocateBillEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="allocateBillEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">调往对象:{{ $route.params.name || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-button key="2" id="allocateBillEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="allocateBillEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="选择产品">
-          <!-- 筛选条件 -->
-          <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="产品编码" prop="productCode">
-                    <a-input id="allocateBillEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品名称" prop="productName">
-                    <a-input id="allocateBillEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="原厂编码" prop="productOrigCode">
-                    <a-input id="allocateBillEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <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-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.stockSn"
-            :columns="columns"
-            :customRow="handleClickRow"
-            :data="loadData"
-            :scroll="{ x: 1240, y: 300 }"
-            bordered>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="allocateBillEdit-add-btn">添加</a-button>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="已选产品">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">总数量:<strong>{{ (productTotal&&productTotal.totalQty) || 0 }}</strong> ,总成本(¥):<strong>{{ (productTotal&&productTotal.totalCost) || 0 }}</strong> ,总售价(¥):<strong>{{ (productTotal&&productTotal.totalPrice) || 0 }}</strong></div>
-          </a-alert>
-          <!-- 筛选条件 -->
-          <a-row :gutter="15">
-            <a-col :span="17">
-              <div class="table-page-search-wrapper">
-                <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
-                  <a-row :gutter="15">
-                    <a-col :md="9" :sm="24">
-                      <a-form-item label="产品编码" prop="productCode">
-                        <a-input id="allocateBillEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="9" :sm="24">
-                      <a-form-item label="产品名称" prop="productName">
-                        <a-input id="allocateBillEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                      <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
-                      <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
-                    </a-col>
-                  </a-row>
-                </a-form>
-              </div>
-            </a-col>
-            <a-col :span="7" style="text-align: right;">
-              <!-- <a-button size="small" id="allocateBillEdit-import-btn">导入明细</a-button> -->
-              <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
-            </a-col>
-          </a-row>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="chooseTable"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="chooseColumns"
-            :dataSource="chooseLoadData"
-            :scroll="{ x: 1335, y: 300 }"
-            :pagination="choosePaginationProps"
-            bordered>
-            <!-- 调出数量 -->
-            <template slot="qty" slot-scope="text, record">
-              <a-input-number
-                id="allocateBillEdit-qty"
-                v-model="record.qty"
-                :precision="0"
-                :min="1"
-                :max="999999"
-                placeholder="请输入"
-                @blur="e => qtyBlur(e.target.value, record)"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
-            </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="allocateBillEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="allocateBillEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">调往对象:{{ $route.params.name || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-button key="2" id="allocateBillEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="allocateBillEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="选择产品">
+            <!-- 筛选条件 -->
+            <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="产品编码" prop="productCode">
+                      <a-input id="allocateBillEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="allocateBillEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="原厂编码" prop="productOrigCode">
+                      <a-input id="allocateBillEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <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-col>
+                </a-row>
+              </a-form>
+            </div>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.stockSn"
+              :columns="columns"
+              :customRow="handleClickRow"
+              :data="loadData"
+              :scroll="{ x: 1240, y: 300 }"
+              bordered>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="allocateBillEdit-add-btn">添加</a-button>
+              </template>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="已选产品">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">总数量:<strong>{{ (productTotal&&productTotal.totalQty) || 0 }}</strong> ,总成本(¥):<strong>{{ (productTotal&&productTotal.totalCost) || 0 }}</strong> ,总售价(¥):<strong>{{ (productTotal&&productTotal.totalPrice) || 0 }}</strong></div>
+            </a-alert>
+            <!-- 筛选条件 -->
+            <a-row :gutter="15">
+              <a-col :span="17">
+                <div class="table-page-search-wrapper">
+                  <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
+                    <a-row :gutter="15">
+                      <a-col :md="9" :sm="24">
+                        <a-form-item label="产品编码" prop="productCode">
+                          <a-input id="allocateBillEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="9" :sm="24">
+                        <a-form-item label="产品名称" prop="productName">
+                          <a-input id="allocateBillEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                        <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-form>
+                </div>
+              </a-col>
+              <a-col :span="7" style="text-align: right;">
+                <!-- <a-button size="small" id="allocateBillEdit-import-btn">导入明细</a-button> -->
+                <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
+              </a-col>
+            </a-row>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="chooseTable"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="chooseColumns"
+              :dataSource="chooseLoadData"
+              :scroll="{ x: 1335, y: 300 }"
+              :pagination="choosePaginationProps"
+              bordered>
+              <!-- 调出数量 -->
+              <template slot="qty" slot-scope="text, record">
+                <a-input-number
+                  id="allocateBillEdit-qty"
+                  v-model="record.qty"
+                  :precision="0"
+                  :min="1"
+                  :max="999999"
+                  placeholder="请输入"
+                  @blur="e => qtyBlur(e.target.value, record)"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="allocateBillEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -153,6 +155,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       queryParam: {
         productCode: '',
         productName: '',
@@ -265,13 +268,16 @@ export default {
           return
         }
       }
+      this.spinning = true
       allocateBillDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.table.refresh()
           this.getChooseProductList()
+          this.spinning = false
         } else {
           row.qty = row.qtyBackups
+          this.spinning = false
         }
       })
     },
@@ -285,19 +291,27 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
+            _this.spinning = true
             allocateBillDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.$refs.table.refresh()
                 _this.getChooseProductList()
+                _this.spinning = false
+              } else {
+                _this.spinning = false
               }
             })
           } else { //  单个删除
+            _this.spinning = true
             allocateBillDetailDel({ 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
               }
             })
           }
@@ -307,12 +321,16 @@ export default {
     //  提交
     handleSubmit () {
       const _this = this
+      _this.spinning = true
       allocateBillSubmit({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           setTimeout(() => {
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
+        } else {
+          _this.spinning = false
         }
       })
     },
@@ -381,7 +399,9 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
+      _this.spinning = true
       allocateBillDetailPrint({ sn: this.$route.params.sn }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 32 - 25
src/views/basicData/transferTypeManagement/editModal.vue

@@ -10,31 +10,33 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="transferTypeManagementEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="调拨类别" prop="allocateCategory">
-          <v-select code="ALLOCATE_CATEGORY" id="transferTypeManagementEdit-allocateCategory" v-model="form.allocateCategory" allowClear placeholder="请选择调拨类别"></v-select>
-        </a-form-model-item>
-        <a-form-model-item label="调拨类型名称" prop="name">
-          <a-input
-            id="transferTypeManagementEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入调拨类型名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="storeTransferOut-type-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="storeTransferOut-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="transferTypeManagementEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="调拨类别" prop="allocateCategory">
+            <v-select code="ALLOCATE_CATEGORY" id="transferTypeManagementEdit-allocateCategory" v-model="form.allocateCategory" allowClear placeholder="请选择调拨类别"></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="调拨类型名称" prop="name">
+            <a-input
+              id="transferTypeManagementEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入调拨类型名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="storeTransferOut-type-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="storeTransferOut-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -67,6 +69,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       detailsData: null, //  品牌数据
       formItemLayout: {
         labelCol: { span: 6 },
@@ -101,10 +104,14 @@ export default {
         if (valid) {
           const form = _this.form
           form.allocateTypeSn = _this.itemSn ? _this.itemSn : null
+          _this.spinning = true
           allocateTypeSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 28 - 23
src/views/basicData/warehouse/editModal.vue

@@ -10,28 +10,30 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="warehouseEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="仓库名称" prop="name">
-          <a-input
-            id="warehouseEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入仓库名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="warehouse-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="warehouseEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="仓库名称" prop="name">
+            <a-input
+              id="warehouseEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入仓库名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="warehouse-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -64,6 +66,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -101,6 +104,7 @@ export default {
             warehouseSn: this.itemSn ? this.itemSn : undefined,
             name: this.form.name //  仓库名称
           }
+          _this.spinning = true
           warehouseSave(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -108,9 +112,10 @@ export default {
               setTimeout(function () {
                 _this.isShow = false
                 _this.$refs.ruleForm.resetFields()
+                _this.spinning = false
               }, 300)
             } else {
-
+              _this.spinning = false
             }
           })
         } else {

+ 32 - 27
src/views/basicData/warehouse/storingLocation/editModal.vue

@@ -10,32 +10,34 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="storingLocationEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="仓位名称" prop="name">
-          <a-input
-            id="storingLocationEdit-name"
-            :maxLength="30"
-            v-model="form.name"
-            placeholder="请输入仓位名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="所属仓库" prop="warehouseSn">
-          <a-select id="storingLocationEdit-warehouseSn" disabled placeholder="请选择所属仓库" allowClear v-model="form.warehouseSn">
-            <a-select-option v-for="item in warehouseList" :key="item.id" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="storingLocation-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="storingLocation-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="storingLocationEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="仓位名称" prop="name">
+            <a-input
+              id="storingLocationEdit-name"
+              :maxLength="30"
+              v-model="form.name"
+              placeholder="请输入仓位名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="所属仓库" prop="warehouseSn">
+            <a-select id="storingLocationEdit-warehouseSn" disabled placeholder="请选择所属仓库" allowClear v-model="form.warehouseSn">
+              <a-select-option v-for="item in warehouseList" :key="item.id" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="storingLocation-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="storingLocation-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -68,6 +70,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -115,6 +118,7 @@ export default {
             warehouseSn: this.form.warehouseSn, //  所属仓库
             name: this.form.name //  仓库名称
           }
+          _this.spinning = true
           warehouseLocSave(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -122,9 +126,10 @@ export default {
               setTimeout(function () {
                 _this.isShow = false
                 _this.$refs.ruleForm.resetFields()
+                _this.spinning = false
               }, 300)
             } else {
-
+              _this.spinning = false
             }
           })
         } else {

+ 0 - 340
src/views/customerManagement/customerInfo/edit.vue

@@ -1,340 +0,0 @@
-<template>
-  <div class="customerManagementEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" v-if="model=='page'" class="customerManagementEdit-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="customerManagementEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="customerManagementEdit-table-page-wrapper">
-      <a-form-model
-        id="customerManagementEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-row :gutter="15">
-          <a-col :span="8">
-            <a-form-model-item label="客户名称" prop="customerName">
-              <a-input
-                id="customerManagementEdit-customerName"
-                :maxLength="30"
-                v-model.trim="form.customerName"
-                @change="filterEmpty"
-                placeholder="请输入客户名称(最多30个字符)"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="联系电话" prop="contactTel">
-              <a-input id="customerManagementEdit-contactTel" :maxLength="11" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多11个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="联系人" prop="contactName">
-              <a-input id="customerManagementEdit-contactName" :maxLength="30" v-model.trim="form.contactName" placeholder="请输入联系人(最多30个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="15">
-          <a-col :span="16">
-            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
-              <a-row :gutter="15">
-                <!-- 客户地址 -->
-                <a-col span="8">
-                  <a-form-model-item prop="provinceSn">
-                    <a-select id="customerManagementEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                      <a-select-option v-for="item in addrProvinceList" :value="item.sn" :key="item.sn + 'a'">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-model-item>
-                </a-col>
-                <a-col span="8">
-                  <a-form-model-item prop="citySn">
-                    <a-select id="customerManagementEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                      <a-select-option v-for="item in addrCityList" :value="item.sn" :key="item.sn + 'b'">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-model-item>
-                </a-col>
-                <a-col span="8">
-                  <a-form-model-item prop="countySn">
-                    <a-select id="customerManagementEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                      <a-select-option v-for="item in addrDistrictList" :value="item.sn" :key="item.sn + 'c'">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-model-item>
-                </a-col>
-              </a-row>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="" prop="customerAddr">
-              <a-input id="customerManagementEdit-customerAddr" :maxLength="60" v-model.trim="form.customerAddr" placeholder="请输入详细地址(最多60个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="15">
-          <a-col :span="8">
-            <a-form-model-item label="客户传真" prop="fax">
-              <a-input id="customerManagementEdit-fax" :maxLength="30" v-model.trim="form.fax" placeholder="请输入客户传真(最多30个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="配送方式" prop="dispatchType">
-              <v-select
-                code="DISPATCH_TYPE"
-                id="customerManagementEdit-dispatchType"
-                v-model="form.dispatchType"
-                allowClear
-                placeholder="请选择配送方式"
-              ></v-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
-              <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="15">
-          <a-col :span="8">
-            <a-form-model-item label="价格类型" ref="priceType" prop="priceType">
-              <v-select code="PRICE_TYPE" id="customerManagementEdit-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型" ></v-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="收款方式" prop="settleStyleSn">
-              <a-select id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式">
-                <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="客户类型" prop="customerTypeSn">
-              <a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
-                <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-          <a-button type="primary" @click="handleSubmit" size="large" id="customerManagementEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
-        </a-form-model-item>
-      </a-form-model>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import { getArea } from '@/api/data'
-import { custSave, custFindById, settleStyleFindAllList } from '@/api/customer'
-import { custTypeFindAllList } from '@/api/custType'
-export default {
-  name: 'CustomerManagementEdit',
-  components: { STable, VSelect },
-  props: {
-    model: {
-      type: String,
-      default: 'page'
-    }
-  },
-  data () {
-    return {
-      formItemLayout: {
-        labelCol: { span: 8 },
-        wrapperCol: { span: 16 }
-      },
-      form: {
-        id: null,
-        customerName: '', // 客户名称
-        contactTel: '', //  联系电话
-        contactName: '', //  联系人
-        provinceSn: undefined, //  省
-        provinceName: '',
-        citySn: undefined, // 市
-        cityName: '',
-        countySn: undefined, // 区
-        countyName: '',
-        customerAddr: '', //  详细地址
-        fax: '', //  客户传真
-        dispatchType: '', //  配送方式
-        satelliteFlag: 0, //  是否卫星仓客户
-        customerTypeSn: undefined, //  客户类型
-        priceType: '', //  价格类型
-        settleStyleSn: undefined //  收款方式
-      },
-      rules: {
-        customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
-        contactTel: [{ required: true, message: '请输入联系电话', trigger: 'blur' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }],
-        provinceSn: [{ required: true, message: '请选择省', trigger: 'change' }],
-        citySn: [{ required: true, message: '请选择市', trigger: 'change' }],
-        countySn: [{ required: true, message: '请选择区/县', trigger: 'change' }],
-        customerAddr: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
-        priceType: [{ required: true, message: '请选择价格类型', trigger: 'change' }],
-        settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }]
-      },
-      addrProvinceList: [], //  省下拉
-      addrCityList: [], //  市下拉
-      addrDistrictList: [], //  区下拉
-      custTypeList: [], //  客户类型  下拉数据
-      settleStyleList: [] //  收款方式  下拉数据
-    }
-  },
-  methods: {
-    filterEmpty () {
-      let str = this.form.customerName
-      str = str.replace(/\ +/g, '')
-      str = str.replace(/[ ]/g, '')
-      str = str.replace(/[\r\n]/g, '')
-      this.form.customerName = str
-    },
-    //  获取客户信息
-    getDetail () {
-      custFindById({ id: this.$route.params.id }).then(res => {
-        if (res.status == 200) {
-          if (res.data.provinceSn) { this.getArea('city', res.data.provinceSn) }
-          if (res.data.citySn) { this.getArea('district', res.data.citySn) }
-          this.form = Object.assign(this.form, res.data)
-        } else {
-          this.$refs.ruleForm.resetFields()
-        }
-      })
-    },
-    //  客户类型
-    getCustTypeList () {
-      custTypeFindAllList().then(res => {
-        if (res.status == 200) {
-          this.custTypeList = res.data
-        } else {
-          this.custTypeList = []
-        }
-      })
-    },
-    // 收款方式
-    getSettleStyleList () {
-      settleStyleFindAllList().then(res => {
-        if (res.status == 200) {
-          this.settleStyleList = res.data
-        } else {
-          this.settleStyleList = []
-        }
-      })
-    },
-    //  保存
-    handleSubmit (e) {
-      e.preventDefault()
-      const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          const form = _this.form
-          form.id = this.$route.params.id && this.model == 'page' ? this.$route.params.id : null
-          custSave(form).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              if (_this.model == 'page') {
-                setTimeout(() => {
-                  _this.$router.push({ path: '/customerManagement/customerInfo/list' })
-                }, 600)
-              } else {
-                _this.$emit('ok', res.data)
-              }
-            }
-          })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    },
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/customerManagement/customerInfo/list' })
-    },
-    // 获取城市列表
-    getCityList (val) {
-      const index = this.addrProvinceList.findIndex(item => item.sn == val)
-      if (index >= 0) {
-        this.form.provinceName = this.addrProvinceList[index].name
-      }
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.form.citySn = undefined
-      this.form.countySn = undefined
-      this.form.customerAddr = ''
-      this.getArea('city', val)
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      const index = this.addrCityList.findIndex(item => item.sn == val)
-      if (index >= 0) {
-        this.form.cityName = this.addrCityList[index].name
-      }
-      this.addrDistrictList = []
-      this.form.countySn = undefined
-      this.form.customerAddr = ''
-      this.getArea('district', val)
-    },
-    // 区县变更
-    areaCharged (val) {
-      const index = this.addrDistrictList.findIndex(item => item.sn == val)
-      if (index >= 0) {
-        this.form.countyName = this.addrDistrictList[index].name
-      }
-      this.form.customerAddr = ''
-    },
-    //  省/市/区
-    getArea (type, sn) {
-      let params
-      if (type == 'province') {
-        params = { level: '1' }
-      } else {
-        params = { psn: sn }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (type == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (type == 'city') {
-            this.addrCityList = res.data || []
-          } else if (type == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (type == 'province') {
-            this.addrProvinceList = []
-          } else if (type == 'city') {
-            this.addrCityList = []
-          } else if (type == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
-    },
-    // 获取基础数据
-    getBaseData () {
-      this.getArea('province') //  省市区
-      this.getCustTypeList() //  客户类型
-      this.getSettleStyleList() // 收款方式
-      this.$refs.ruleForm.resetFields()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getBaseData()
-      if (vm.$route.params.id) {
-        //  编辑页
-        vm.getDetail()
-      }
-    })
-  }
-}
-</script>
-
-<style lang="less">
-.customerManagementEdit-wrap {
-	.customerManagementEdit-back {
-		margin-bottom: 10px;
-	}
-}
-</style>

+ 39 - 32
src/views/dealerManagement/dealerAccountManagement/editModal.vue

@@ -10,53 +10,54 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="dealerAccountEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="经销商名称" prop="tenantSn">
-          <custList ref="custList" v-if="itemId==''" id="dealerAccountEdit-tenantSn" @change="custChange"></custList>
-          <span v-else>{{ detailData ? (detailData.org ? detailData.org.name : '--') : '--' }}</span>
-        </a-form-model-item>
-        <a-form-model-item label="管理员姓名" prop="name">
-          <a-input
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="dealerAccountEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+          >
+          <a-form-model-item label="经销商名称" prop="tenantSn">
+            <custList ref="custList" v-if="itemId==''" id="dealerAccountEdit-tenantSn" @change="custChange"></custList>
+            <span v-else>{{ detailData ? (detailData.org ? detailData.org.name : '--') : '--' }}</span>
+          </a-form-model-item>
+          <a-form-model-item label="管理员姓名" prop="name">
+            <a-input
             id="dealerAccountEdit-name"
             :maxLength="30"
             v-model.trim="form.name"
             placeholder="请输入管理员姓名(最多30个字符)"
             allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="管理员手机" prop="phone">
-          <a-input
+          </a-form-model-item>
+          <a-form-model-item label="管理员手机" prop="phone">
+            <a-input
             id="dealerAccountEdit-phone"
             :maxLength="11"
             v-model.trim="form.phone"
             placeholder="请输入管理员手机(最多11个字符)"
             allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="管理员账号" prop="loginName">
-          <a-input
+          </a-form-model-item>
+          <a-form-model-item label="管理员账号" prop="loginName">
+            <a-input
             id="dealerAccountEdit-loginName"
             :maxLength="50"
             v-model.trim="form.loginName"
             placeholder="请输入管理员账号,字母/数字(最多50个字符)"
             allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="管理员密码" :prop="itemId=='' ? 'password' : ''" :extra="itemId ? '说明:已录入的密码不会显示,录入新密码将会覆盖原有密码' : ''" >
-          <a-input
+          </a-form-model-item>
+          <a-form-model-item label="管理员密码" :prop="itemId=='' ? 'password' : ''" :extra="itemId ? '说明:已录入的密码不会显示,录入新密码将会覆盖原有密码' : ''" >
+            <a-input
             id="dealerAccountEdit-password"
             :maxLength="50"
             type="password"
             v-model.trim="form.password"
             placeholder="请输入管理员密码,字母/数字(最多50个字符)"
             allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="最大可开通用户数" prop="org.childUserMaxNum" extra="(含管理员账号)">
-          <a-input-number
+          </a-form-model-item>
+          <a-form-model-item label="最大可开通用户数" prop="org.childUserMaxNum" extra="(含管理员账号)">
+            <a-input-number
             id="dealerAccountEdit-childUserMaxNum"
             v-model="form.org.childUserMaxNum"
             :precision="0"
@@ -64,12 +65,13 @@
             :max="999999"
             placeholder="请输入数量"
             style="width: 100%;" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="dealerAccountEdit-save" @click="handleSave">保存</a-button>
-        <a-button id="dealerAccountEdit-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-      </div>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="dealerAccountEdit-save" @click="handleSave">保存</a-button>
+          <a-button id="dealerAccountEdit-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
+		  </a-spin>
     </div>
   </a-modal>
 </template>
@@ -93,6 +95,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 18 }
@@ -132,11 +135,15 @@ export default {
           if (!formData.password) {
             delete formData.password
           }
+          _this.spinning = true
           dealerUserSave(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.isShow = false
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
           })
         } else {

+ 26 - 19
src/views/dealerManagement/dealerRelationshipBinding/associateModal.vue

@@ -10,25 +10,27 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="relationshipBinding-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="上级名称" v-if="nowData">
-          {{ nowData.dealerName }}
-        </a-form-model-item>
-        <a-form-model-item label="选择下级">
-          <queryChild ref="queryChid" :dealerLevelList="dealerLevelList" @change="handleDisassociate"></queryChild>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">确定</a-button>
-        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="relationshipBinding-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="上级名称" v-if="nowData">
+            {{ nowData.dealerName }}
+          </a-form-model-item>
+          <a-form-model-item label="选择下级">
+            <queryChild ref="queryChid" :dealerLevelList="dealerLevelList" @change="handleDisassociate"></queryChild>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">确定</a-button>
+          <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -56,6 +58,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       form: {},
       rules: {},
       formItemLayout: {
@@ -105,11 +108,15 @@ export default {
     },
     handleBind (formData) {
       const _this = this
+      _this.spinning = true
       bindRelation(formData).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$emit('ok', formData.parentDealerSn)
           _this.isShow = false
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },

+ 54 - 47
src/views/dealerManagement/marketingDivisionSet/editModal.vue

@@ -10,52 +10,54 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="marketingDivisionSetEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="分区名称" prop="subareaName">
-          <a-input
-            id="marketingDivisionSetEdit-subareaName"
-            :maxLength="30"
-            v-model="form.subareaName"
-            @change="filterEmpty"
-            placeholder="请输入分区名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="省份/市">
-          <div class="tree-node" id="treeNode">
-            <div class="tree-box" v-for="item in addrProvinceList" :key="item.id">
-              <div class="tree-parent">
-                <span>
-                  <a-checkbox style="width: 100%;" :indeterminate="item.indeterminate" v-model="item.checked" @change="onChange(item,$event)">
-                    {{ item.name }}
-                    <!-- <i style="font-size: 12px;color: #999;font-style: normal;">(已选 {{ item.children | hasCheckChild }} 个市区)</i> -->
-                  </a-checkbox>
-                </span>
-                <span @click="expend(item)"><a-icon :title="item.isOpen==0?'展开':'收起'" :type="item.isOpen==0?'plus-square':'minus-square'" /></span>
-              </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="marketingDivisionSetEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="分区名称" prop="subareaName">
+            <a-input
+              id="marketingDivisionSetEdit-subareaName"
+              :maxLength="30"
+              v-model="form.subareaName"
+              @change="filterEmpty"
+              placeholder="请输入分区名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="省份/市">
+            <div class="tree-node" id="treeNode">
+              <div class="tree-box" v-for="item in addrProvinceList" :key="item.id">
+                <div class="tree-parent">
+                  <span>
+                    <a-checkbox style="width: 100%;" :indeterminate="item.indeterminate" v-model="item.checked" @change="onChange(item,$event)">
+                      {{ item.name }}
+                      <!-- <i style="font-size: 12px;color: #999;font-style: normal;">(已选 {{ item.children | hasCheckChild }} 个市区)</i> -->
+                    </a-checkbox>
+                  </span>
+                  <span @click="expend(item)"><a-icon :title="item.isOpen==0?'展开':'收起'" :type="item.isOpen==0?'plus-square':'minus-square'" /></span>
+                </div>
 
-              <!-- 子级 -->
-              <div v-show="item.isOpen==1" class="tree-child">
-                <div v-for="child in item.children" :key="child.id">
-                  <a-checkbox v-model="child.checked" style="width: 100%;" @change="onChange(child,$event,item)">
-                    {{ child.name }}
-                  </a-checkbox>
+                <!-- 子级 -->
+                <div v-show="item.isOpen==1" class="tree-child">
+                  <div v-for="child in item.children" :key="child.id">
+                    <a-checkbox v-model="child.checked" style="width: 100%;" @change="onChange(child,$event,item)">
+                      {{ child.name }}
+                    </a-checkbox>
+                  </div>
                 </div>
               </div>
             </div>
-          </div>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="marketingDivisionSetEdit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="marketingDivisionSetEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="marketingDivisionSetEdit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="marketingDivisionSetEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -95,6 +97,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 18 }
@@ -120,7 +123,7 @@ export default {
       this.form.subareaName = str
     },
     onChange (item, e, parent) {
-      console.log(item, `checked = ${e.target.checked}`)
+      // console.log(item, `checked = ${e.target.checked}`)
       item.checked = e.target.checked
       item.noSave = false
       // 父级
@@ -230,18 +233,22 @@ export default {
           const formData = JSON.parse(JSON.stringify(_this.form))
           this.subareaAreaList = []
           this.filterData(this.addrProvinceList)
-          console.log(this.subareaAreaList)
+          // console.log(this.subareaAreaList)
           // 编辑
           if (this.itemId) {
             formData.subareaSn = this.itemId
           }
           formData.subareaAreaList = this.subareaAreaList
-          console.log(formData, 'formData')
+          // console.log(formData, 'formData')
+          _this.spinning = true
           subareaSaveSubareaArea(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {
@@ -252,7 +259,7 @@ export default {
     // 编辑
     getChecked () {
       subareaFindBySn({ sn: this.itemId }).then(res => {
-        console.log(res.data)
+        // console.log(res.data)
         this.form.subareaName = res.data.subareaName
         this.subareaAreaList = res.data.subareaAreaList
         this.form.subareaSn = res.data.subareaSn
@@ -270,7 +277,7 @@ export default {
       })
       // 市回显
       const hasCity = this.nowData.subareaAreaList.filter(item => item.citySubareaAreaList && item.citySubareaAreaList.length)
-      console.log(hasCity, 'hasCity.nowData')
+      // console.log(hasCity, 'hasCity.nowData')
       hasCity.map(item => {
         // 省
         const pre = this.addrProvinceList.find(k => k.areaSn == item.areaSn)

+ 372 - 364
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -6,366 +6,368 @@
         <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
     </a-page-header>
-    <a-form-model
-      id="merchantInfoManagementEdit-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol">
-      <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="merchantInfoManagementEdit-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="基础信息">
-            <a-row>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经销商名称" prop="dealerName">
-                  <a-input v-model.trim="form.dealerName" id="merchantInfoManagementEdit-dealerName" :maxLength="30" allowClear placeholder="请输入经销商名称(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经销商别名" prop="dealerAlias">
-                  <a-input v-model.trim="form.dealerAlias" id="merchantInfoManagementEdit-dealerAlias" :maxLength="30" allowClear placeholder="请输入经销商别名(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="商户类型" prop="dealerType">
-                  <v-select
-                    code="DEALER_TYPE"
-                    id="merchantInfoManagementEdit-dealerType"
-                    v-model="form.dealerType"
-                    allowClear
-                    placeholder="请选择商户类型"></v-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系人1" prop="contact">
-                  <a-input v-model.trim="form.contact" id="merchantInfoManagementEdit-contact" :maxLength="30" allowClear placeholder="请输入联系人1(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系手机1" prop="contactMobile">
-                  <a-input v-model.trim="form.contactMobile" id="merchantInfoManagementEdit-contactMobile" :maxLength="11" allowClear placeholder="请输入联系手机1(最多11个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系角色1" prop="contactRole">
-                  <a-input v-model.trim="form.contactRole" id="merchantInfoManagementEdit-contactRole" :maxLength="30" allowClear placeholder="请输入联系角色1(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系电话" prop="dealerTelephone">
-                  <a-input v-model.trim="form.dealerTelephone" id="merchantInfoManagementEdit-dealerTelephone" :maxLength="13" allowClear placeholder="请输入联系电话" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                <a-form-model-item label="地址" required style="margin: 0;" :label-col="{span:4}" :wrapper-col="{span:20}">
-                  <a-row :gutter="20">
-                    <!-- 地址 -->
-                    <a-col span="8">
-                      <a-form-model-item prop="provinceSn">
-                        <a-select id="merchantInfoManagementEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="8">
-                      <a-form-model-item prop="citySn">
-                        <a-select id="merchantInfoManagementEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="8">
-                      <a-form-model-item prop="districtSn">
-                        <a-select id="merchantInfoManagementEdit-districtSn" @change="areaCharged" v-model="form.districtSn" placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="详细地址" prop="address">
-                  <a-input
-                    id="merchantInfoManagementEdit-address"
-                    :maxLength="60"
-                    v-model="form.address"
-                    placeholder="请输入详细地址(最多60个字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-      <!-- 公司信息 -->
-      <a-card size="small" :bordered="false" class="merchantInfoManagementEdit-cont">
-        <a-collapse>
-          <a-collapse-panel key="1" header="公司信息">
-            <a-row>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经营方式" prop="busniessMode" help="(例:国有企业)">
-                  <a-input
-                    v-model.trim="form.busniessMode"
-                    id="merchantInfoManagementEdit-busniessMode"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入经营方式(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经营项目" prop="busniessItmes">
-                  <a-input
-                    v-model.trim="form.busniessItmes"
-                    id="merchantInfoManagementEdit-busniessItmes"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入经营项目(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="公司规模" prop="busniessScope" help="(例:100-999人)">
-                  <a-input-number
-                    id="merchantInfoManagementEdit-busniessScope"
-                    v-model="form.busniessScope"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="成立时间" prop="buildDate">
-                  <a-date-picker
-                    style="width:100%"
-                    id="merchantInfoManagementEdit-buildDate"
-                    :disabledDate="disabledDate"
-                    v-model="form.buildDate"
-                    :format="dateFormat"
-                    placeholder="请选择日期" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="一般纳税人" prop="isTaxpayer">
-                  <v-select
-                    code="FLAG"
-                    id="customerManagementEdit-isTaxpayer"
-                    v-model="form.isTaxpayer"
-                    allowClear
-                    placeholder="请选择是否"
-                  ></v-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="身份证号码" prop="indentityCard">
-                  <a-input
-                    v-model.trim="form.indentityCard"
-                    id="merchantInfoManagementEdit-indentityCard"
-                    :maxLength="18"
-                    allowClear
-                    placeholder="请输入身份证号码(最多18个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="生日" prop="brithday">
-                  <a-date-picker
-                    style="width:100%"
-                    id="merchantInfoManagementEdit-brithday"
-                    :disabledDate="disabledDate"
-                    v-model="form.brithday"
-                    :format="dateFormat"
-                    placeholder="请选择日期" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="籍贯" prop="nativePlace">
-                  <a-input
-                    v-model.trim="form.nativePlace"
-                    id="merchantInfoManagementEdit-nativePlace"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入籍贯(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="邮箱" prop="mail">
-                  <a-input
-                    v-model.trim="form.mail"
-                    id="merchantInfoManagementEdit-mail"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入邮箱(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系人2" prop="contact2">
-                  <a-input v-model.trim="form.contact2" id="merchantInfoManagementEdit-contact2" :maxLength="30" allowClear placeholder="请输入联系人2(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系手机2" prop="contactMobile2">
-                  <a-input v-model.trim="form.contactMobile2" id="merchantInfoManagementEdit-contactMobile2" :maxLength="11" allowClear placeholder="请输入联系手机2(最多11个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系角色2" prop="contractRole2">
-                  <a-input v-model.trim="form.contractRole2" id="merchantInfoManagementEdit-contractRole2" :maxLength="30" allowClear placeholder="请输入联系角色2(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="邮政编码" prop="zipCode">
-                  <a-input v-model.trim="form.zipCode" id="merchantInfoManagementEdit-zipCode" :maxLength="6" allowClear placeholder="请输入邮政编码(最多6个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="收货人" prop="receiveContact">
-                  <a-input v-model.trim="form.receiveContact" id="merchantInfoManagementEdit-receiveContact" :maxLength="30" allowClear placeholder="请输入收货人(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="收货电话" prop="receiveMobile">
-                  <a-input v-model.trim="form.receiveMobile" id="merchantInfoManagementEdit-receiveMobile" :maxLength="13" allowClear placeholder="请输入收货电话" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                <a-form-model-item label="收货地址" style="margin: 0;" :label-col="{span:4}" :wrapper-col="{span:20}">
-                  <a-row :gutter="20">
-                    <!-- 地址 -->
-                    <a-col span="8">
-                      <a-form-model-item prop="receiveProvinceSn">
-                        <a-select id="merchantInfoManagementEdit-receiveProvinceSn" @change="getCityList1" v-model="form.receiveProvinceSn" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList1" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="8">
-                      <a-form-model-item prop="receiveCitySn">
-                        <a-select id="merchantInfoManagementEdit-receiveCitySn" @change="getAreaList1" v-model="form.receiveCitySn" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList1" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="8">
-                      <a-form-model-item prop="receiveDistrictSn">
-                        <a-select id="merchantInfoManagementEdit-receiveDistrictSn" @change="areaCharged1" v-model="form.receiveDistrictSn" placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList1" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="收货详细地址" prop="receiveAddress">
-                  <a-input
-                    id="merchantInfoManagementEdit-receiveAddress"
-                    :maxLength="60"
-                    v-model="form.receiveAddress"
-                    placeholder="请输入收货详细地址(最多60个字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="银行账户" prop="tradeAccountName" help="(例:张三)">
-                  <a-input
-                    v-model.trim="form.tradeAccountName"
-                    id="merchantInfoManagementEdit-tradeAccountName"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入银行账户(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="开户行" prop="tradeBankName" help="(例:交通银行)">
-                  <a-input
-                    v-model.trim="form.tradeBankName"
-                    id="merchantInfoManagementEdit-tradeBankName"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入开户行(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="银行账号" prop="tradeBankAccount" help="(例:1123 5677 1112 22342 1123)">
-                  <a-input
-                    v-model.trim="form.tradeBankAccount"
-                    id="merchantInfoManagementEdit-tradeBankAccount"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入银行账号(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-      <!-- 总部信息 -->
-      <a-card size="small" :bordered="false" class="merchantInfoManagementEdit-cont">
-        <a-collapse>
-          <a-collapse-panel key="1" header="总部信息">
-            <a-row>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="箭冠汽配代码" prop="jgAutoPartsCode">
-                  <a-input
-                    id="merchantInfoManagementEdit-jgAutoPartsCode"
-                    :maxLength="30"
-                    v-model="form.jgAutoPartsCode"
-                    placeholder="请输入箭冠汽配代码(最多30个字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="门头更换日期" prop="jgDoorHeaderChangeTime">
-                  <a-date-picker
-                    style="width:100%"
-                    id="merchantInfoManagementEdit-jgDoorHeaderChangeTime"
-                    :disabledDate="disabledDate"
-                    v-model="form.jgDoorHeaderChangeTime"
-                    :format="dateFormat"
-                    placeholder="请选择日期" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="特约价是否可见" prop="isShowSpecialPrice">
-                  <a-radio-group
-                    name="radioGroup"
-                    v-model="form.isShowSpecialPrice"
-                    :disabled="detailData&&detailData.dealerLevel == 'SPECIAL'"
-                    id="merchantInfoManagementEdit-isShowSpecialPrice" >
-                    <a-radio :value="1">是</a-radio>
-                    <a-radio :value="0">否</a-radio>
-                  </a-radio-group>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                <a-form-model-item label="备注" prop="remark" :label-col="{span:4}" :wrapper-col="{span:20}">
-                  <a-textarea
-                    id="merchantInfoManagementEdit-remark"
-                    :maxLength="300"
-                    v-model="form.remark"
-                    placeholder="请输入备注(最多300个字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-    </a-form-model>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          class="button-primary"
-          id="merchantInfoManagementEdit-submit-btn"
-          size="large"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="merchantInfoManagementEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <!-- 基础信息 -->
+        <a-card size="small" :bordered="false" class="merchantInfoManagementEdit-cont">
+          <a-collapse :activeKey="['1']">
+            <a-collapse-panel key="1" header="基础信息">
+              <a-row>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="经销商名称" prop="dealerName">
+                    <a-input v-model.trim="form.dealerName" id="merchantInfoManagementEdit-dealerName" :maxLength="30" allowClear placeholder="请输入经销商名称(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="经销商别名" prop="dealerAlias">
+                    <a-input v-model.trim="form.dealerAlias" id="merchantInfoManagementEdit-dealerAlias" :maxLength="30" allowClear placeholder="请输入经销商别名(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="商户类型" prop="dealerType">
+                    <v-select
+                      code="DEALER_TYPE"
+                      id="merchantInfoManagementEdit-dealerType"
+                      v-model="form.dealerType"
+                      allowClear
+                      placeholder="请选择商户类型"></v-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系人1" prop="contact">
+                    <a-input v-model.trim="form.contact" id="merchantInfoManagementEdit-contact" :maxLength="30" allowClear placeholder="请输入联系人1(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系手机1" prop="contactMobile">
+                    <a-input v-model.trim="form.contactMobile" id="merchantInfoManagementEdit-contactMobile" :maxLength="11" allowClear placeholder="请输入联系手机1(最多11个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系角色1" prop="contactRole">
+                    <a-input v-model.trim="form.contactRole" id="merchantInfoManagementEdit-contactRole" :maxLength="30" allowClear placeholder="请输入联系角色1(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系电话" prop="dealerTelephone">
+                    <a-input v-model.trim="form.dealerTelephone" id="merchantInfoManagementEdit-dealerTelephone" :maxLength="13" allowClear placeholder="请输入联系电话" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+                  <a-form-model-item label="地址" required style="margin: 0;" :label-col="{span:4}" :wrapper-col="{span:20}">
+                    <a-row :gutter="20">
+                      <!-- 地址 -->
+                      <a-col span="8">
+                        <a-form-model-item prop="provinceSn">
+                          <a-select id="merchantInfoManagementEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                            <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col span="8">
+                        <a-form-model-item prop="citySn">
+                          <a-select id="merchantInfoManagementEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                            <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col span="8">
+                        <a-form-model-item prop="districtSn">
+                          <a-select id="merchantInfoManagementEdit-districtSn" @change="areaCharged" v-model="form.districtSn" placeholder="请选择区/县">
+                            <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                    </a-row>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="详细地址" prop="address">
+                    <a-input
+                      id="merchantInfoManagementEdit-address"
+                      :maxLength="60"
+                      v-model="form.address"
+                      placeholder="请输入详细地址(最多60个字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-collapse-panel>
+          </a-collapse>
+        </a-card>
+        <!-- 公司信息 -->
+        <a-card size="small" :bordered="false" class="merchantInfoManagementEdit-cont">
+          <a-collapse>
+            <a-collapse-panel key="1" header="公司信息">
+              <a-row>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="经营方式" prop="busniessMode" help="(例:国有企业)">
+                    <a-input
+                      v-model.trim="form.busniessMode"
+                      id="merchantInfoManagementEdit-busniessMode"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入经营方式(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="经营项目" prop="busniessItmes">
+                    <a-input
+                      v-model.trim="form.busniessItmes"
+                      id="merchantInfoManagementEdit-busniessItmes"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入经营项目(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="公司规模" prop="busniessScope" help="(例:100-999人)">
+                    <a-input-number
+                      id="merchantInfoManagementEdit-busniessScope"
+                      v-model="form.busniessScope"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="成立时间" prop="buildDate">
+                    <a-date-picker
+                      style="width:100%"
+                      id="merchantInfoManagementEdit-buildDate"
+                      :disabledDate="disabledDate"
+                      v-model="form.buildDate"
+                      :format="dateFormat"
+                      placeholder="请选择日期" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="一般纳税人" prop="isTaxpayer">
+                    <v-select
+                      code="FLAG"
+                      id="customerManagementEdit-isTaxpayer"
+                      v-model="form.isTaxpayer"
+                      allowClear
+                      placeholder="请选择是否"
+                    ></v-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="身份证号码" prop="indentityCard">
+                    <a-input
+                      v-model.trim="form.indentityCard"
+                      id="merchantInfoManagementEdit-indentityCard"
+                      :maxLength="18"
+                      allowClear
+                      placeholder="请输入身份证号码(最多18个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="生日" prop="brithday">
+                    <a-date-picker
+                      style="width:100%"
+                      id="merchantInfoManagementEdit-brithday"
+                      :disabledDate="disabledDate"
+                      v-model="form.brithday"
+                      :format="dateFormat"
+                      placeholder="请选择日期" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="籍贯" prop="nativePlace">
+                    <a-input
+                      v-model.trim="form.nativePlace"
+                      id="merchantInfoManagementEdit-nativePlace"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入籍贯(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="邮箱" prop="mail">
+                    <a-input
+                      v-model.trim="form.mail"
+                      id="merchantInfoManagementEdit-mail"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入邮箱(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系人2" prop="contact2">
+                    <a-input v-model.trim="form.contact2" id="merchantInfoManagementEdit-contact2" :maxLength="30" allowClear placeholder="请输入联系人2(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系手机2" prop="contactMobile2">
+                    <a-input v-model.trim="form.contactMobile2" id="merchantInfoManagementEdit-contactMobile2" :maxLength="11" allowClear placeholder="请输入联系手机2(最多11个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系角色2" prop="contractRole2">
+                    <a-input v-model.trim="form.contractRole2" id="merchantInfoManagementEdit-contractRole2" :maxLength="30" allowClear placeholder="请输入联系角色2(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="邮政编码" prop="zipCode">
+                    <a-input v-model.trim="form.zipCode" id="merchantInfoManagementEdit-zipCode" :maxLength="6" allowClear placeholder="请输入邮政编码(最多6个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="收货人" prop="receiveContact">
+                    <a-input v-model.trim="form.receiveContact" id="merchantInfoManagementEdit-receiveContact" :maxLength="30" allowClear placeholder="请输入收货人(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="收货电话" prop="receiveMobile">
+                    <a-input v-model.trim="form.receiveMobile" id="merchantInfoManagementEdit-receiveMobile" :maxLength="13" allowClear placeholder="请输入收货电话" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+                  <a-form-model-item label="收货地址" style="margin: 0;" :label-col="{span:4}" :wrapper-col="{span:20}">
+                    <a-row :gutter="20">
+                      <!-- 地址 -->
+                      <a-col span="8">
+                        <a-form-model-item prop="receiveProvinceSn">
+                          <a-select id="merchantInfoManagementEdit-receiveProvinceSn" @change="getCityList1" v-model="form.receiveProvinceSn" placeholder="请选择省">
+                            <a-select-option v-for="item in addrProvinceList1" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col span="8">
+                        <a-form-model-item prop="receiveCitySn">
+                          <a-select id="merchantInfoManagementEdit-receiveCitySn" @change="getAreaList1" v-model="form.receiveCitySn" placeholder="请选择市">
+                            <a-select-option v-for="item in addrCityList1" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col span="8">
+                        <a-form-model-item prop="receiveDistrictSn">
+                          <a-select id="merchantInfoManagementEdit-receiveDistrictSn" @change="areaCharged1" v-model="form.receiveDistrictSn" placeholder="请选择区/县">
+                            <a-select-option v-for="item in addrDistrictList1" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                    </a-row>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="收货详细地址" prop="receiveAddress">
+                    <a-input
+                      id="merchantInfoManagementEdit-receiveAddress"
+                      :maxLength="60"
+                      v-model="form.receiveAddress"
+                      placeholder="请输入收货详细地址(最多60个字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="银行账户" prop="tradeAccountName" help="(例:张三)">
+                    <a-input
+                      v-model.trim="form.tradeAccountName"
+                      id="merchantInfoManagementEdit-tradeAccountName"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入银行账户(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="开户行" prop="tradeBankName" help="(例:交通银行)">
+                    <a-input
+                      v-model.trim="form.tradeBankName"
+                      id="merchantInfoManagementEdit-tradeBankName"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入开户行(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="银行账号" prop="tradeBankAccount" help="(例:1123 5677 1112 22342 1123)">
+                    <a-input
+                      v-model.trim="form.tradeBankAccount"
+                      id="merchantInfoManagementEdit-tradeBankAccount"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入银行账号(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-collapse-panel>
+          </a-collapse>
+        </a-card>
+        <!-- 总部信息 -->
+        <a-card size="small" :bordered="false" class="merchantInfoManagementEdit-cont">
+          <a-collapse>
+            <a-collapse-panel key="1" header="总部信息">
+              <a-row>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="箭冠汽配代码" prop="jgAutoPartsCode">
+                    <a-input
+                      id="merchantInfoManagementEdit-jgAutoPartsCode"
+                      :maxLength="30"
+                      v-model="form.jgAutoPartsCode"
+                      placeholder="请输入箭冠汽配代码(最多30个字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="门头更换日期" prop="jgDoorHeaderChangeTime">
+                    <a-date-picker
+                      style="width:100%"
+                      id="merchantInfoManagementEdit-jgDoorHeaderChangeTime"
+                      :disabledDate="disabledDate"
+                      v-model="form.jgDoorHeaderChangeTime"
+                      :format="dateFormat"
+                      placeholder="请选择日期" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="特约价是否可见" prop="isShowSpecialPrice">
+                    <a-radio-group
+                      name="radioGroup"
+                      v-model="form.isShowSpecialPrice"
+                      :disabled="detailData&&detailData.dealerLevel == 'SPECIAL'"
+                      id="merchantInfoManagementEdit-isShowSpecialPrice" >
+                      <a-radio :value="1">是</a-radio>
+                      <a-radio :value="0">否</a-radio>
+                    </a-radio-group>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+                  <a-form-model-item label="备注" prop="remark" :label-col="{span:4}" :wrapper-col="{span:20}">
+                    <a-textarea
+                      id="merchantInfoManagementEdit-remark"
+                      :maxLength="300"
+                      v-model="form.remark"
+                      placeholder="请输入备注(最多300个字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-collapse-panel>
+          </a-collapse>
+        </a-card>
+      </a-form-model>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            class="button-primary"
+            id="merchantInfoManagementEdit-submit-btn"
+            size="large"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -378,6 +380,7 @@ export default {
   components: { VSelect },
   data () {
     return {
+      spinning: false,
       formItemLayout: {
         labelCol: {
           span: 8
@@ -515,18 +518,23 @@ export default {
     },
     // 提交
     handleSubmit () {
+      const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          console.log(this.form, 'form data')
-          const params = JSON.parse(JSON.stringify(this.form))
+          // console.log(this.form, 'form data')
+          const params = JSON.parse(JSON.stringify(_this.form))
           params.buildDate = params.buildDate ? moment(params.buildDate).format('YYYY-MM-DD hh:mm:ss') : ''
           params.brithday = params.brithday ? moment(params.brithday).format('YYYY-MM-DD hh:mm:ss') : ''
           params.cooperateEffectiveTime = params.cooperateEffectiveTime ? moment(params.cooperateEffectiveTime).format('YYYY-MM-DD hh:mm:ss') : ''
           params.jgDoorHeaderChangeTime = params.jgDoorHeaderChangeTime ? moment(params.jgDoorHeaderChangeTime).format('YYYY-MM-DD hh:mm:ss') : ''
+          _this.spinning = true
           dealerSave(params).then(res => {
             if (res.status == 200) {
-              this.$message.success(res.message)
-              this.handleBack()
+              _this.$message.success(res.message)
+              _this.handleBack()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 37 - 29
src/views/dealerManagement/merchantInfoManagement/updateCooperate.vue

@@ -9,32 +9,34 @@
     @cancle="isShow=false"
     :width="600">
     <div>
-      <a-form-model
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="labelCol"
-        :wrapper-col="wrapperCol"
-      >
-        <a-form-model-item label="商户名称">
-          {{ form.dealerName }}
-        </a-form-model-item>
-        <a-form-model-item label="合作状态" prop="cooperateFlag">
-          <v-select code="DEALER_COOPERATE_FLAG" id="ucModal-cooperateFlag" v-model="form.cooperateFlag" allowClear placeholder="请选择合作状态"></v-select>
-        </a-form-model-item>
-        <a-form-model-item label="生效时间" prop="cooperateEffectiveTime">
-          <a-date-picker
-            style="width:100%"
-            id="ucModal-cooperateEffectiveTime"
-            v-model="form.cooperateEffectiveTime"
-            :format="dateFormat"
-            placeholder="请选择日期" />
-        </a-form-model-item>
-        <div style="display: flex;justify-content: center;padding: 30px 0;">
-          <a-button type="primary" @click="onSubmit">确定</a-button>
-          <a-button style="margin-left: 50px;" @click="cansel">取消</a-button>
-        </div>
-      </a-form-model>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="labelCol"
+          :wrapper-col="wrapperCol"
+        >
+          <a-form-model-item label="商户名称">
+            {{ form.dealerName }}
+          </a-form-model-item>
+          <a-form-model-item label="合作状态" prop="cooperateFlag">
+            <v-select code="DEALER_COOPERATE_FLAG" id="ucModal-cooperateFlag" v-model="form.cooperateFlag" allowClear placeholder="请选择合作状态"></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="生效时间" prop="cooperateEffectiveTime">
+            <a-date-picker
+              style="width:100%"
+              id="ucModal-cooperateEffectiveTime"
+              v-model="form.cooperateEffectiveTime"
+              :format="dateFormat"
+              placeholder="请选择日期" />
+          </a-form-model-item>
+          <div style="display: flex;justify-content: center;padding: 30px 0;">
+            <a-button type="primary" @click="onSubmit">确定</a-button>
+            <a-button style="margin-left: 50px;" @click="cansel">取消</a-button>
+          </div>
+        </a-form-model>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -55,6 +57,7 @@ export default {
   data () {
     return {
       isShow: this.openUcModal, //  是否打开弹框
+      spinning: false,
       title: '合作设置',
       dateFormat: 'YYYY-MM-DD',
       labelCol: { span: 5 },
@@ -87,14 +90,19 @@ export default {
       this.form.cooperateEffectiveTime = row.cooperateEffectiveTime
     },
     onSubmit () {
+      const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          const params = JSON.parse(JSON.stringify(this.form))
+          const params = JSON.parse(JSON.stringify(_this.form))
           params.cooperateEffectiveTime = moment(params.cooperateEffectiveTime).format('YYYY-MM-DD') + ' 00:00:00'
+          _this.spinning = true
           updateCooperate(params).then(res => {
             if (res.status == 200) {
-              this.$message.success(res.message)
-              this.$emit('ok')
+              _this.$message.success(res.message)
+              _this.$emit('ok')
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 25 - 18
src/views/dealerManagement/merchantInfoManagement/updateDealerLevel.vue

@@ -9,24 +9,26 @@
     @cancle="isShow=false"
     :width="600">
     <div>
-      <a-form-model
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="labelCol"
-        :wrapper-col="wrapperCol"
-      >
-        <a-form-model-item label="商户名称">
-          {{ form.dealerName }}
-        </a-form-model-item>
-        <a-form-model-item label="商户级别" prop="dealerLevel">
-          <v-select code="DEALER_LEVEL" id="ucModal-dealerLevel" v-model="form.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
-        </a-form-model-item>
-        <div style="display: flex;justify-content: center;padding: 30px 0;">
-          <a-button type="primary" @click="onSubmit">确定</a-button>
-          <a-button style="margin-left: 50px;" @click="cansel">取消</a-button>
-        </div>
-      </a-form-model>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="labelCol"
+          :wrapper-col="wrapperCol"
+        >
+          <a-form-model-item label="商户名称">
+            {{ form.dealerName }}
+          </a-form-model-item>
+          <a-form-model-item label="商户级别" prop="dealerLevel">
+            <v-select code="DEALER_LEVEL" id="ucModal-dealerLevel" v-model="form.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
+          </a-form-model-item>
+          <div style="display: flex;justify-content: center;padding: 30px 0;">
+            <a-button type="primary" @click="onSubmit">确定</a-button>
+            <a-button style="margin-left: 50px;" @click="cansel">取消</a-button>
+          </div>
+        </a-form-model>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -46,6 +48,7 @@ export default {
   data () {
     return {
       isShow: this.openUdModal, //  是否打开弹框
+      spinning: false,
       title: '级别设置',
       labelCol: { span: 5 },
       wrapperCol: { span: 16 },
@@ -94,10 +97,14 @@ export default {
     submitForm () {
       const _this = this
       const params = JSON.parse(JSON.stringify(_this.form))
+      _this.spinning = true
       updateDealerLevel(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$emit('ok')
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },

+ 26 - 19
src/views/dealerManagement/rebateSettings/associateModal.vue

@@ -10,25 +10,27 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="relationshipBinding-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="经销商名称" v-if="nowData">
-          {{ nowData.subDealer.dealerName }}
-        </a-form-model-item>
-        <a-form-model-item label="差价归属">
-          <queryChild ref="queryChid" :dealerLevelList="dealerLevelList" @change="handleDisassociate"></queryChild>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">确定</a-button>
-        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="relationshipBinding-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="经销商名称" v-if="nowData">
+            {{ nowData.subDealer.dealerName }}
+          </a-form-model-item>
+          <a-form-model-item label="差价归属">
+            <queryChild ref="queryChid" :dealerLevelList="dealerLevelList" @change="handleDisassociate"></queryChild>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">确定</a-button>
+          <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -52,6 +54,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       form: {},
       rules: {},
       formItemLayout: {
@@ -80,11 +83,15 @@ export default {
             rebateDealerSn: _this.rebateDealerSn,
             dealerSn: _this.nowData && _this.nowData.subDealer.dealerSn ? _this.nowData.subDealer.dealerSn : undefined
           }
+          _this.spinning = true
           updateRebate(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok', formData.dealerSn)
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 25 - 19
src/views/power/role/menuModal.vue

@@ -7,25 +7,27 @@
       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-spin :spinning="spinning" tip="Loading...">
+        <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-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-form>
+      </a-spin>
     </a-modal>
   </div>
 </template>
@@ -52,6 +54,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       treeData: [],
       roleName: '',
       expandedKeys: [],
@@ -89,6 +92,7 @@ export default {
           }
           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') {
@@ -96,8 +100,10 @@ export default {
               this.$emit('refresh')
               setTimeout(function () {
                 _this.cancel()
+                _this.spinning = false
               }, 300)
             } else {
+              _this.spinning = false
               // this.$message.error(res.message)
             }
           })

+ 54 - 49
src/views/power/role/roleModal.vue

@@ -8,58 +8,59 @@
       @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-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 :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-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-spin>
     </a-modal>
   </div>
 </template>
@@ -88,6 +89,7 @@ export default {
     return {
       titleText: '添加角色',
       isshow: this.visible,
+      spinning: false,
       formLayout: 'horizontal',
       form: this.$form.createForm(this, { name: 'roleModal' }),
       formData: {
@@ -109,6 +111,7 @@ export default {
       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') {
@@ -116,8 +119,10 @@ export default {
               this.$emit('refresh')
               setTimeout(function () {
                 _this.cancel()
+                _this.spinning = false
               }, 300)
             } else {
+              _this.spinning = false
               // this.$message.error(res.message)
             }
           })

+ 25 - 18
src/views/power/user/updateAreal.vue

@@ -9,24 +9,26 @@
     @cancle="isShow=false"
     :width="600">
     <div>
-      <a-form-model
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="labelCol"
-        :wrapper-col="wrapperCol"
-      >
-        <a-form-model-item label="用户名称">
-          {{ form.name }}
-        </a-form-model-item>
-        <a-form-model-item label="所属营销分区" prop="subareaSn">
-          <subarea id="user-subarea" v-model="form.subareaSn"></subarea>
-        </a-form-model-item>
-        <div style="display: flex;justify-content: center;padding: 30px 0;">
-          <a-button type="primary" @click="onSubmit">确定</a-button>
-          <a-button style="margin-left: 50px;" @click="cansel">取消</a-button>
-        </div>
-      </a-form-model>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="labelCol"
+          :wrapper-col="wrapperCol"
+        >
+          <a-form-model-item label="用户名称">
+            {{ form.name }}
+          </a-form-model-item>
+          <a-form-model-item label="所属营销分区" prop="subareaSn">
+            <subarea id="user-subarea" v-model="form.subareaSn"></subarea>
+          </a-form-model-item>
+          <div style="display: flex;justify-content: center;padding: 30px 0;">
+            <a-button type="primary" @click="onSubmit">确定</a-button>
+            <a-button style="margin-left: 50px;" @click="cansel">取消</a-button>
+          </div>
+        </a-form-model>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -47,6 +49,7 @@ export default {
   data () {
     return {
       isShow: this.openUdModal, //  是否打开弹框
+      spinning: false,
       title: '分区设置',
       labelCol: { span: 5 },
       wrapperCol: { span: 16 },
@@ -86,11 +89,15 @@ export default {
         userSn: _this.nowData.sn,
         subareaSn: _this.form.subareaSn
       }
+      _this.spinning = true
       userSubareaSave(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.isShow = false
           _this.$emit('ok')
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },

+ 94 - 89
src/views/power/user/userModal.vue

@@ -9,94 +9,96 @@
       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="24">
-          <a-col :span="12">
-            <a-form-model-item label="用户账号" prop="loginName">
-              <a-input id="userEdit-loginName" v-model.trim="form.loginName":maxLength="50" allowClear placeholder="请输入用户账号(最多50个字符)"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12" v-if="!(nowData&&nowData.id)">
-            <a-form-model-item label="用户密码" prop="password">
-              <a-input
-                id="userEdit-password"
-                type="password"
-                v-model.trim="form.password"
-                :maxLength="16"
-                allowClear
-                placeholder="请输入用户密码(最多16个字符)"/>
-            </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-spin :spinning="spinning" tip="Loading...">
+        <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="24">
+            <a-col :span="12">
+              <a-form-model-item label="用户账号" prop="loginName">
+                <a-input id="userEdit-loginName" v-model.trim="form.loginName":maxLength="50" allowClear placeholder="请输入用户账号(最多50个字符)"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12" v-if="!(nowData&&nowData.id)">
+              <a-form-model-item label="用户密码" prop="password">
+                <a-input
+                  id="userEdit-password"
+                  type="password"
+                  v-model.trim="form.password"
+                  :maxLength="16"
+                  allowClear
+                  placeholder="请输入用户密码(最多16个字符)"/>
+              </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-spin>
     </a-modal>
   </div>
 </template>
@@ -124,6 +126,7 @@ export default {
   data () {
     return {
       titleText: '新增用户',
+      spinning: false,
       isshow: this.visible,
       roleList: [],
       formItemLayout: {
@@ -168,15 +171,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 {

+ 49 - 42
src/views/productManagement/productBrand/editModal.vue

@@ -10,48 +10,50 @@
     :width="960">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="productBrandEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="品牌名称" prop="brandName">
-          <a-input
-            id="productBrandEdit-brandName"
-            :maxLength="30"
-            v-model="form.brandName"
-            placeholder="请输入产品品牌名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="品牌分类" prop="brandType">
-          <v-select code="BRAND_TYPE" id="productBrandEdit-brandType" v-model="form.brandType" allowClear placeholder="请选择品牌分类"></v-select>
-        </a-form-model-item>
-        <a-form-model-item label="排序字母" prop="sortChar">
-          <a-select placeholder="请选择排序字母" id="productBrandEdit-sortChar" allowClear v-model="form.sortChar">
-            <a-select-option v-for="item in sortCharList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-        <a-form-model-item label="品牌图片" prop="imageUrl">
-          <Upload
-            class="upload"
-            id="productBrandEdit-imageUrl"
-            v-model="form.imageUrl"
-            ref="imageUrl"
-            @change="changeHomeImage"
-            listType="picture-card" ></Upload>
-          <span class="upload-desc">说明:图片比例1:1,尺寸为120*120px,可上传1张。</span>
-        </a-form-model-item>
-        <a-form-model-item label="品牌介绍" prop="brandIntroduce">
-          <editor id="productBrandEdit-brandIntroduce" ref="editor" class="productBrandEdit-brandIntroduce" @on-change="editorChange" :cache="false"></editor>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="productBrandEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="品牌名称" prop="brandName">
+            <a-input
+              id="productBrandEdit-brandName"
+              :maxLength="30"
+              v-model="form.brandName"
+              placeholder="请输入产品品牌名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="品牌分类" prop="brandType">
+            <v-select code="BRAND_TYPE" id="productBrandEdit-brandType" v-model="form.brandType" allowClear placeholder="请选择品牌分类"></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="排序字母" prop="sortChar">
+            <a-select placeholder="请选择排序字母" id="productBrandEdit-sortChar" allowClear v-model="form.sortChar">
+              <a-select-option v-for="item in sortCharList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item label="品牌图片" prop="imageUrl">
+            <Upload
+              class="upload"
+              id="productBrandEdit-imageUrl"
+              v-model="form.imageUrl"
+              ref="imageUrl"
+              @change="changeHomeImage"
+              listType="picture-card" ></Upload>
+            <span class="upload-desc">说明:图片比例1:1,尺寸为120*120px,可上传1张。</span>
+          </a-form-model-item>
+          <a-form-model-item label="品牌介绍" prop="brandIntroduce">
+            <editor id="productBrandEdit-brandIntroduce" ref="editor" class="productBrandEdit-brandIntroduce" @on-change="editorChange" :cache="false"></editor>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -87,6 +89,7 @@ export default {
     return {
       sortCharList: dataList.sortCharList,
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 3 },
         wrapperCol: { span: 19 }
@@ -136,11 +139,15 @@ export default {
           const formData = JSON.parse(JSON.stringify(_this.form))
           formData.id = undefined
           formData.brandSn = _this.itemSn ? _this.itemSn : undefined
+          _this.spinning = true
           productBrandSave(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 32 - 25
src/views/productManagement/productCategory/editModal.vue

@@ -10,31 +10,33 @@
     :width="800">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="productCategoryEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="所属分类" v-if="parentType">
-          {{ parentType }}
-        </a-form-model-item>
-        <a-form-model-item label="产品分类名称" prop="productTypeName">
-          <a-input
-            v-model.trim="form.productTypeName"
-            @change="filterEmpty"
-            id="productCategoryEdit-name"
-            :maxLength="30"
-            allowClear
-            placeholder="请输入产品分类名称(最多30个字符)" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="productCategoryEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="所属分类" v-if="parentType">
+            {{ parentType }}
+          </a-form-model-item>
+          <a-form-model-item label="产品分类名称" prop="productTypeName">
+            <a-input
+              v-model.trim="form.productTypeName"
+              @change="filterEmpty"
+              id="productCategoryEdit-name"
+              :maxLength="30"
+              allowClear
+              placeholder="请输入产品分类名称(最多30个字符)" />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -67,6 +69,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -101,11 +104,15 @@ export default {
           } else { //  新增子级
             formData.parentSn = _this.nowData && _this.nowData.productTypeSn ? _this.nowData.productTypeSn : undefined
           }
+          _this.spinning = true
           productTypeSave(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 207 - 200
src/views/productManagement/productInfo/edit.vue

@@ -6,206 +6,208 @@
         <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
     </a-page-header>
-    <a-form-model
-      id="productInfoEdit-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol">
-      <a-card :bordered="false" class="productInfoEdit-cont">
-        <a-row>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品名称" prop="name">
-              <a-input v-model.trim="form.name" id="productInfoEdit-name" :maxLength="100" allowClear placeholder="请输入产品名称(最多100个字符)" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品编码" prop="code">
-              <a-input
-                id="productInfoEdit-code"
-                :maxLength="100"
-                :disabled="form.state&&form.state!='WAIT'"
-                v-model="form.code"
-                placeholder="请输入产品编码(最多100个字符)"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="原厂编码" prop="origCode">
-              <a-input
-                id="productInfoEdit-origCode"
-                :maxLength="200"
-                v-model="form.origCode"
-                placeholder="请输入(最多200个字符,多个编码用逗号隔开)"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="其他编码" prop="otherCode">
-              <a-input
-                id="productInfoEdit-otherCode"
-                :maxLength="60"
-                v-model="form.otherCode"
-                placeholder="请输入(最多60个字符,多个编码用逗号隔开)"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品品牌" prop="productBrandSn">
-              <a-select
-                id="productInfoEdit-productBrand"
-                placeholder="请选择产品品牌"
-                allowClear
-                v-model="form.productBrandSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品分类" prop="productType">
-              <a-cascader
-                :disabled="form.state&&form.state!='WAIT'"
-                expand-trigger="hover"
-                @change="changeProductType"
-                :options="productTypeList"
-                :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                id="productInfoEdit-productType"
-                placeholder="请选择产品分类"
-                allowClear
-                v-model="form.productType" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="单位" prop="unit">
-              <v-select
-                code="PRODUCT_UNIT"
-                id="productInfoEdit-unit"
-                v-model="form.unit"
-                allowClear
-                placeholder="请选择单位"
-              ></v-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="包装数" prop="packQty" :label-col="{span:4}" :wrapper-col="{span:16}">
-              <a-row>
-                <a-col :span="14">
-                  <a-input-number
-                    id="productInfoEdit-packQty"
-                    v-model="form.packQty"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 70%;" /><span>{{ form.unit }}/</span>
-                </a-col>
-                <a-col :span="10">
-                  <v-select
-                    code="PRODUCT_UNIT"
-                    id="productLevelEdit-packQtyUnit"
-                    v-model="form.packQtyUnit"
-                    allowClear
-                    placeholder="包装数单位"
-                  ></v-select>
-                </a-col>
-              </a-row>
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="箭冠产品" prop="arrowFalg">
-              <v-select
-                code="ARROW_FALG"
-                id="productInfoEdit-arrowFalg"
-                v-model="form.arrowFalg"
-                allowClear
-                placeholder="请选择"
-              ></v-select>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-            <a-form-model-item label="产品图片" help="说明:图片比例1:1,尺寸大于300*300px,首张为主图,最多5张。" :label-col="{span:3}" :wrapper-col="{span:18}">
-              <Upload
-                class="upload"
-                id="productInfoEdit-productMsg"
-                v-model="form.productMsg"
-                ref="productMsg"
-                @change="changeImage"
-                :maxNums="5"
-                listType="picture-card" ></Upload>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品尺寸" prop="size">
-              <a-input
-                v-model.trim="form.size"
-                id="productInfoEdit-size"
-                :maxLength="50"
-                allowClear
-                placeholder="请输入产品尺寸(最多50个字符)" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品重量" prop="weight">
-              <a-input
-                v-model.trim="form.weight"
-                id="productInfoEdit-weight"
-                :maxLength="50"
-                allowClear
-                placeholder="请输入产品重量(最多50个字符)" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="颜色" prop="color">
-              <a-input
-                v-model.trim="form.color"
-                id="productLevelEdit-color"
-                :maxLength="50"
-                allowClear
-                placeholder="请输入颜色(最多50个字符)" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品内盒尺寸" prop="boxSize">
-              <a-input
-                v-model.trim="form.boxSize"
-                id="productInfoEdit-boxSize"
-                :maxLength="50"
-                allowClear
-                placeholder="请输入产品内盒尺寸(最多50个字符)" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <a-form-model-item label="产品说明" prop="description" :label-col="{span:2}" :wrapper-col="{span:20}">
-              <editor id="productInfoEdit-description" ref="editor" class="productInfoEdit-description" @on-change="editorDescriptionChange" :cache="false"></editor>
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <a-form-model-item label="其他说明" prop="otherDesc" :label-col="{span:2}" :wrapper-col="{span:20}">
-              <editor id="productInfoEdit-other-otherDesc" ref="otherDesc" class="productInfoEdit-otherDesc" @on-change="editorOtherChange" :cache="false"></editor>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-      </a-card>
-    </a-form-model>
-    <a-affix :offset-bottom="0" class="affix">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          class="button-primary"
-          id="productInfoEdit-submit-btn"
-          size="large"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="productInfoEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-card :bordered="false" class="productInfoEdit-cont">
+          <a-row>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品名称" prop="name">
+                <a-input v-model.trim="form.name" id="productInfoEdit-name" :maxLength="100" allowClear placeholder="请输入产品名称(最多100个字符)" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品编码" prop="code">
+                <a-input
+                  id="productInfoEdit-code"
+                  :maxLength="100"
+                  :disabled="form.state&&form.state!='WAIT'"
+                  v-model="form.code"
+                  placeholder="请输入产品编码(最多100个字符)"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="原厂编码" prop="origCode">
+                <a-input
+                  id="productInfoEdit-origCode"
+                  :maxLength="200"
+                  v-model="form.origCode"
+                  placeholder="请输入(最多200个字符,多个编码用逗号隔开)"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="其他编码" prop="otherCode">
+                <a-input
+                  id="productInfoEdit-otherCode"
+                  :maxLength="60"
+                  v-model="form.otherCode"
+                  placeholder="请输入(最多60个字符,多个编码用逗号隔开)"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品品牌" prop="productBrandSn">
+                <a-select
+                  id="productInfoEdit-productBrand"
+                  placeholder="请选择产品品牌"
+                  allowClear
+                  v-model="form.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品分类" prop="productType">
+                <a-cascader
+                  :disabled="form.state&&form.state!='WAIT'"
+                  expand-trigger="hover"
+                  @change="changeProductType"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="productInfoEdit-productType"
+                  placeholder="请选择产品分类"
+                  allowClear
+                  v-model="form.productType" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="单位" prop="unit">
+                <v-select
+                  code="PRODUCT_UNIT"
+                  id="productInfoEdit-unit"
+                  v-model="form.unit"
+                  allowClear
+                  placeholder="请选择单位"
+                ></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="包装数" prop="packQty" :label-col="{span:4}" :wrapper-col="{span:16}">
+                <a-row>
+                  <a-col :span="14">
+                    <a-input-number
+                      id="productInfoEdit-packQty"
+                      v-model="form.packQty"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 70%;" /><span>{{ form.unit }}/</span>
+                  </a-col>
+                  <a-col :span="10">
+                    <v-select
+                      code="PRODUCT_UNIT"
+                      id="productLevelEdit-packQtyUnit"
+                      v-model="form.packQtyUnit"
+                      allowClear
+                      placeholder="包装数单位"
+                    ></v-select>
+                  </a-col>
+                </a-row>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="箭冠产品" prop="arrowFalg">
+                <v-select
+                  code="ARROW_FALG"
+                  id="productInfoEdit-arrowFalg"
+                  v-model="form.arrowFalg"
+                  allowClear
+                  placeholder="请选择"
+                ></v-select>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row>
+            <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+              <a-form-model-item label="产品图片" help="说明:图片比例1:1,尺寸大于300*300px,首张为主图,最多5张。" :label-col="{span:3}" :wrapper-col="{span:18}">
+                <Upload
+                  class="upload"
+                  id="productInfoEdit-productMsg"
+                  v-model="form.productMsg"
+                  ref="productMsg"
+                  @change="changeImage"
+                  :maxNums="5"
+                  listType="picture-card" ></Upload>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品尺寸" prop="size">
+                <a-input
+                  v-model.trim="form.size"
+                  id="productInfoEdit-size"
+                  :maxLength="50"
+                  allowClear
+                  placeholder="请输入产品尺寸(最多50个字符)" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品重量" prop="weight">
+                <a-input
+                  v-model.trim="form.weight"
+                  id="productInfoEdit-weight"
+                  :maxLength="50"
+                  allowClear
+                  placeholder="请输入产品重量(最多50个字符)" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="颜色" prop="color">
+                <a-input
+                  v-model.trim="form.color"
+                  id="productLevelEdit-color"
+                  :maxLength="50"
+                  allowClear
+                  placeholder="请输入颜色(最多50个字符)" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="产品内盒尺寸" prop="boxSize">
+                <a-input
+                  v-model.trim="form.boxSize"
+                  id="productInfoEdit-boxSize"
+                  :maxLength="50"
+                  allowClear
+                  placeholder="请输入产品内盒尺寸(最多50个字符)" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <a-form-model-item label="产品说明" prop="description" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <editor id="productInfoEdit-description" ref="editor" class="productInfoEdit-description" @on-change="editorDescriptionChange" :cache="false"></editor>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <a-form-model-item label="其他说明" prop="otherDesc" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <editor id="productInfoEdit-other-otherDesc" ref="otherDesc" class="productInfoEdit-otherDesc" @on-change="editorOtherChange" :cache="false"></editor>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </a-card>
+      </a-form-model>
+      <a-affix :offset-bottom="0" class="affix">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            class="button-primary"
+            id="productInfoEdit-submit-btn"
+            size="large"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -219,6 +221,7 @@ export default {
   components: { VSelect, Upload, Editor },
   data () {
     return {
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
@@ -302,12 +305,16 @@ export default {
           form.id = _this.$route.params.id ? _this.$route.params.id : undefined
           delete form.productType
           delete form.updateDate
+          _this.spinning = true
           productSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.handleBack()
+                _this.spinning = false
               }, 1000)
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 57 - 50
src/views/productManagement/productInfo/offlineModal.vue

@@ -10,59 +10,61 @@
     :width="800">
     <p v-if="loadData.length==1" style="font-weight: bold;margin-left: 20px;">确认要下线吗?</p>
     <p v-else style="font-weight: bold;margin-left: 20px;">已选有效数据{{ loadData.length }}条,确认要批量下线吗?</p>
-    <a-form-model
-      id="productInfoEdit-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol">
-      <a-form-model-item label="下线选项" prop="offlineReasonType">
-        <v-select
-          code="OFFLINE_REASON_TYPE"
-          id="productInfoOffline-offlineReasonType"
-          v-model="form.offlineReasonType"
-          allowClear
-          placeholder="请选择下线选项"
-        ></v-select>
-      </a-form-model-item>
-      <a-form-model-item label="通用编码" :required="form.offlineReasonType=='通用'">
-        <!-- 列表 -->
-        <a-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.productSn"
-          :columns="columns"
-          :dataSource="loadData"
-          :pagination="false"
-          bordered>
-          <!-- 通用编码 -->
-          <template slot="commonCode" slot-scope="text, record" >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="productInfoEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="下线选项" prop="offlineReasonType">
+          <v-select
+            code="OFFLINE_REASON_TYPE"
+            id="productInfoOffline-offlineReasonType"
+            v-model="form.offlineReasonType"
+            allowClear
+            placeholder="请选择下线选项"
+          ></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="通用编码" :required="form.offlineReasonType=='通用'">
+          <!-- 列表 -->
+          <a-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.productSn"
+            :columns="columns"
+            :dataSource="loadData"
+            :pagination="false"
+            bordered>
+            <!-- 通用编码 -->
+            <template slot="commonCode" slot-scope="text, record" >
             <div>
               <a-input
-                id="productInfoOffline-commonCode"
-                :maxLength="60"
-                v-model="record.commonCode"
-                placeholder="请输入通用编码(最多60个字符)"
-                allowClear />
+              id="productInfoOffline-commonCode"
+              :maxLength="60"
+              v-model="record.commonCode"
+              placeholder="请输入通用编码(最多60个字符)"
+              allowClear />
             </div>
-          </template>
-        </a-table>
-      </a-form-model-item>
-      <a-form-model-item label="下线备注" prop="offlineRemark">
-        <a-textarea
-          id="productInfoOffline-offlineRemark"
-          :maxLength="60"
-          v-model="form.offlineRemark"
-          placeholder="请输入下线备注(最多60个字符)"
-          allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="productInfoOffline-submit" @click="handleSubmit">确定</a-button>
-      <a-button id="productInfoOffline-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
-    </div>
+            </template>
+          </a-table>
+        </a-form-model-item>
+        <a-form-model-item label="下线备注" prop="offlineRemark">
+          <a-textarea
+            id="productInfoOffline-offlineRemark"
+            :maxLength="60"
+            v-model="form.offlineRemark"
+            placeholder="请输入下线备注(最多60个字符)"
+            allowClear />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="productInfoOffline-submit" @click="handleSubmit">确定</a-button>
+        <a-button id="productInfoOffline-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -87,6 +89,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 3 },
         wrapperCol: { span: 21 }
@@ -127,13 +130,17 @@ export default {
         if (valid) {
           const params = JSON.parse(JSON.stringify(_this.form))
           params.offlineProductList = _this.loadData
+          _this.spinning = true
           productOffline(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.$emit('ok')
                 _this.isShow = false
+                _this.spinning = false
               }, 1000)
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 29 - 22
src/views/productManagement/productLevel/editModal.vue

@@ -10,28 +10,30 @@
     :width="800">
     <!-- 编辑价格 -->
     <div>
-      <a-form-model
-        id="productLevelEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="产品编码">
-          {{ nowData&&nowData.code ? nowData.code : '--' }}
-        </a-form-model-item>
-        <a-form-model-item label="产品名称">
-          {{ nowData&&nowData.name ? nowData.name : '--' }}
-        </a-form-model-item>
-        <a-form-model-item label="产品级别" prop="level">
-          <v-select code="PRODUCT_LEVEL" id="productLevelEdit-level" v-model="form.level" allowClear placeholder="请选择产品级别"></v-select>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="productLevelEdit-save" @click="handleSave">保存</a-button>
-        <a-button id="productLevelEdit-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="productLevelEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="产品编码">
+            {{ nowData&&nowData.code ? nowData.code : '--' }}
+          </a-form-model-item>
+          <a-form-model-item label="产品名称">
+            {{ nowData&&nowData.name ? nowData.name : '--' }}
+          </a-form-model-item>
+          <a-form-model-item label="产品级别" prop="level">
+            <v-select code="PRODUCT_LEVEL" id="productLevelEdit-level" v-model="form.level" allowClear placeholder="请选择产品级别"></v-select>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="productLevelEdit-save" @click="handleSave">保存</a-button>
+          <a-button id="productLevelEdit-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -61,6 +63,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
@@ -83,13 +86,17 @@ export default {
         if (valid) {
           const params = _this.nowData
           params.level = _this.form.level
+          _this.spinning = true
           productSave(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.$emit('ok')
                 _this.isShow = false
+                _this.spinning = false
               }, 1000)
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 41 - 35
src/views/productManagement/productPricing/auditModal.vue

@@ -8,42 +8,44 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
-    <!-- 定价审核 -->
-    <div v-if="detailsData">
-      <a-descriptions bordered :column="1">
-        <a-descriptions-item label="成本价">
-          <div v-if="detailsData && detailsData.supplierProductList" style="margin-top: 8px;">
-            <p v-for="(item, index) in detailsData.supplierProductList" :key="index" style="margin: 0;">{{ ((item.cost || item.cost==0) ? item.cost.toFixed(2) : '--') + ' 元 -- ' + item.supplierName + ';' }}</p>
-          </div>
-          <span v-else>--</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="省级价">
-          {{ detailsData.afterProvincePrice }}
-          <span v-if="detailsData.afterProvincePrice != detailsData.beforeProvincePrice">(原{{ detailsData.beforeProvincePrice }})</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="市级价">
-          {{ detailsData.afterCityPrice }}
-          <span v-if="detailsData.afterCityPrice != detailsData.beforeCityPrice">(原{{ detailsData.beforeCityPrice }})</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="特约价">
-          {{ detailsData.afterSpecialPrice }}
-          <span v-if="detailsData.afterSpecialPrice != detailsData.beforeSpecialPrice">(原{{ detailsData.beforeSpecialPrice }})</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="终端价">
-          {{ detailsData.afterTerminalPrice }}
-          <span v-if="detailsData.afterTerminalPrice != detailsData.beforeTerminalPrice">(原{{ detailsData.beforeTerminalPrice }})</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="车主价">
-          {{ detailsData.afterCarOwnersPrice }}
-          <span v-if="detailsData.afterCarOwnersPrice != detailsData.beforeCarOwnersPrice">(原{{ detailsData.beforeCarOwnersPrice }})</span>
-        </a-descriptions-item>
-        <a-descriptions-item label="变更原因">{{ detailsData.changeReason }}</a-descriptions-item>
-      </a-descriptions>
-      <div class="btn-cont">
-        <a-button type="primary" id="productPricingAudit-save" @click="handleAudit">审核通过</a-button>
-        <a-button id="productPricingAudit-back" @click="isShow = false" style="margin-left: 100px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 定价审核 -->
+      <div v-if="detailsData">
+        <a-descriptions bordered :column="1">
+          <a-descriptions-item label="成本价">
+            <div v-if="detailsData && detailsData.supplierProductList" style="margin-top: 8px;">
+              <p v-for="(item, index) in detailsData.supplierProductList" :key="index" style="margin: 0;">{{ ((item.cost || item.cost==0) ? item.cost.toFixed(2) : '--') + ' 元 -- ' + item.supplierName + ';' }}</p>
+            </div>
+            <span v-else>--</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="省级价">
+            {{ detailsData.afterProvincePrice }}
+            <span v-if="detailsData.afterProvincePrice != detailsData.beforeProvincePrice">(原{{ detailsData.beforeProvincePrice }})</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="市级价">
+            {{ detailsData.afterCityPrice }}
+            <span v-if="detailsData.afterCityPrice != detailsData.beforeCityPrice">(原{{ detailsData.beforeCityPrice }})</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="特约价">
+            {{ detailsData.afterSpecialPrice }}
+            <span v-if="detailsData.afterSpecialPrice != detailsData.beforeSpecialPrice">(原{{ detailsData.beforeSpecialPrice }})</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="终端价">
+            {{ detailsData.afterTerminalPrice }}
+            <span v-if="detailsData.afterTerminalPrice != detailsData.beforeTerminalPrice">(原{{ detailsData.beforeTerminalPrice }})</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="车主价">
+            {{ detailsData.afterCarOwnersPrice }}
+            <span v-if="detailsData.afterCarOwnersPrice != detailsData.beforeCarOwnersPrice">(原{{ detailsData.beforeCarOwnersPrice }})</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="变更原因">{{ detailsData.changeReason }}</a-descriptions-item>
+        </a-descriptions>
+        <div class="btn-cont">
+          <a-button type="primary" id="productPricingAudit-save" @click="handleAudit">审核通过</a-button>
+          <a-button id="productPricingAudit-back" @click="isShow = false" style="margin-left: 100px;">返回列表</a-button>
+        </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -64,6 +66,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       detailsData: null //  详情数据
     }
   },
@@ -80,10 +83,13 @@ export default {
     },
     // 审核
     handleAudit () {
+      this.spinning = true
       productPricingAudit(this.detailsData).then(res => {
         if (res.status == 200) {
           this.isShow = false
           this.$emit('ok')
+        } else {
+          this.spinning = false
         }
       })
     }

+ 88 - 81
src/views/productManagement/productPricing/editModal.vue

@@ -10,87 +10,89 @@
     :width="800">
     <!-- 编辑价格 -->
     <div>
-      <a-form-model
-        id="productPricingEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="成本价">
-          <div v-if="detailData && detailData.supplierProductList" style="margin-top: 8px;">
-            <p v-for="(item, index) in detailData.supplierProductList" :key="index" style="margin: 0;line-height: 1.5em;">{{ ((item.cost || item.cost==0) ? item.cost.toFixed(2) : '--') + ' 元 -- ' + item.supplierName + ';' }}</p>
-          </div>
-          <span v-else>--</span>
-        </a-form-model-item>
-        <a-form-model-item label="省级价" prop="afterProvincePrice">
-          <a-input-number
-            id="productPricingEdit-afterProvincePrice"
-            v-model="form.afterProvincePrice"
-            :precision="2"
-            :min="1"
-            :max="999999"
-            placeholder="请输入省级价"
-            style="width: 100%;" />
-        </a-form-model-item>
-        <a-form-model-item label="市级价" prop="afterCityPrice">
-          <a-input-number
-            id="productPricingEdit-afterCityPrice"
-            v-model="form.afterCityPrice"
-            :precision="2"
-            :min="1"
-            :max="999999"
-            placeholder="请输入市级价"
-            style="width: 100%;" />
-        </a-form-model-item>
-        <a-form-model-item label="特约价" prop="afterSpecialPrice">
-          <a-input-number
-            id="productPricingEdit-afterSpecialPrice"
-            v-model="form.afterSpecialPrice"
-            :precision="2"
-            :min="1"
-            :max="999999"
-            placeholder="请输入特约价"
-            style="width: 100%;" />
-        </a-form-model-item>
-        <a-form-model-item label="终端价" prop="afterTerminalPrice">
-          <a-input-number
-            id="productPricingEdit-afterTerminalPrice"
-            v-model="form.afterTerminalPrice"
-            :precision="2"
-            :min="1"
-            :max="999999"
-            placeholder="请输入终端价"
-            style="width: 100%;" />
-        </a-form-model-item>
-        <a-form-model-item label="车主价" prop="afterCarOwnersPrice">
-          <a-input-number
-            id="productPricingEdit-afterCarOwnersPrice"
-            v-model="form.afterCarOwnersPrice"
-            :precision="2"
-            :min="1"
-            :max="999999"
-            placeholder="请输入车主价"
-            style="width: 100%;" />
-        </a-form-model-item>
-        <a-form-model-item label="变更原因" prop="changeReason">
-          <v-select
-            code="PRODUCT_PRICE_CHANGE_REASON"
-            id="productPricingEdit-changeReason"
-            v-model="form.changeReason"
-            allowClear
-            placeholder="请选择变更原因"
-          ></v-select>
-        </a-form-model-item>
-      </a-form-model>
-      <div style="margin-left: 40px;">
-        <a-icon type="exclamation-circle" style="margin-right: 10px;" />说明:各个价格至少有1个填写后才能保存成功。
-      </div>
-      <div class="btn-cont">
-        <a-button type="primary" id="productPricingEdit-save" @click="handleSave">保存</a-button>
-        <a-button id="productPricingEdit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="productPricingEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="成本价">
+            <div v-if="detailData && detailData.supplierProductList" style="margin-top: 8px;">
+              <p v-for="(item, index) in detailData.supplierProductList" :key="index" style="margin: 0;line-height: 1.5em;">{{ ((item.cost || item.cost==0) ? item.cost.toFixed(2) : '--') + ' 元 -- ' + item.supplierName + ';' }}</p>
+            </div>
+            <span v-else>--</span>
+          </a-form-model-item>
+          <a-form-model-item label="省级价" prop="afterProvincePrice">
+            <a-input-number
+              id="productPricingEdit-afterProvincePrice"
+              v-model="form.afterProvincePrice"
+              :precision="2"
+              :min="1"
+              :max="999999"
+              placeholder="请输入省级价"
+              style="width: 100%;" />
+          </a-form-model-item>
+          <a-form-model-item label="市级价" prop="afterCityPrice">
+            <a-input-number
+              id="productPricingEdit-afterCityPrice"
+              v-model="form.afterCityPrice"
+              :precision="2"
+              :min="1"
+              :max="999999"
+              placeholder="请输入市级价"
+              style="width: 100%;" />
+          </a-form-model-item>
+          <a-form-model-item label="特约价" prop="afterSpecialPrice">
+            <a-input-number
+              id="productPricingEdit-afterSpecialPrice"
+              v-model="form.afterSpecialPrice"
+              :precision="2"
+              :min="1"
+              :max="999999"
+              placeholder="请输入特约价"
+              style="width: 100%;" />
+          </a-form-model-item>
+          <a-form-model-item label="终端价" prop="afterTerminalPrice">
+            <a-input-number
+              id="productPricingEdit-afterTerminalPrice"
+              v-model="form.afterTerminalPrice"
+              :precision="2"
+              :min="1"
+              :max="999999"
+              placeholder="请输入终端价"
+              style="width: 100%;" />
+          </a-form-model-item>
+          <a-form-model-item label="车主价" prop="afterCarOwnersPrice">
+            <a-input-number
+              id="productPricingEdit-afterCarOwnersPrice"
+              v-model="form.afterCarOwnersPrice"
+              :precision="2"
+              :min="1"
+              :max="999999"
+              placeholder="请输入车主价"
+              style="width: 100%;" />
+          </a-form-model-item>
+          <a-form-model-item label="变更原因" prop="changeReason">
+            <v-select
+              code="PRODUCT_PRICE_CHANGE_REASON"
+              id="productPricingEdit-changeReason"
+              v-model="form.changeReason"
+              allowClear
+              placeholder="请选择变更原因"
+            ></v-select>
+          </a-form-model-item>
+        </a-form-model>
+        <div style="margin-left: 40px;">
+          <a-icon type="exclamation-circle" style="margin-right: 10px;" />说明:各个价格至少有1个填写后才能保存成功。
+        </div>
+        <div class="btn-cont">
+          <a-button type="primary" id="productPricingEdit-save" @click="handleSave">保存</a-button>
+          <a-button id="productPricingEdit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -114,6 +116,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 17 }
@@ -164,13 +167,17 @@ export default {
           const form = JSON.parse(JSON.stringify(_this.form))
           form.id = this.detailData.id || undefined
           form.productSn = _this.itemSn
+          _this.spinning = true
           productPricingSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.$emit('ok')
                 _this.isShow = false
+                _this.spinning = false
               }, 1000)
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 107 - 100
src/views/promotionRulesManagement/promotionRules/basicInfoModal.vue

@@ -8,150 +8,152 @@
     v-model="isShow"
     @cancle="isShow = false"
     :width="960">
-    <a-form-model
-      id="promotionRules-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-form-model-item label="活动名称" prop="name" :label-col="{span: 4}">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="promotionRules-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="活动名称" prop="name" :label-col="{span: 4}">
         <a-input
           id="promotionRules-basicInfo-name"
           :maxLength="100"
           v-model.trim="form.name"
           placeholder="请输入活动名称(最多100个字符)"
           allowClear />
-      </a-form-model-item>
-      <a-row :gutter="15">
+        </a-form-model-item>
+        <a-row :gutter="15">
         <a-col span="12">
           <a-form-model-item label="活动时间" prop="activeDateEnable">
-            <a-select
-              id="promotionRules-basicInfo-activeDateEnable"
-              placeholder="请选择"
-              @change="handleChange('activeDateEnable')"
-              v-model="form.activeDateEnable"
-              style="width: 100%;">
-              <a-select-option v-for="item in rangeList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
-            </a-select>
+          <a-select
+            id="promotionRules-basicInfo-activeDateEnable"
+            placeholder="请选择"
+            @change="handleChange('activeDateEnable')"
+            v-model="form.activeDateEnable"
+            style="width: 100%;">
+            <a-select-option v-for="item in rangeList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
+          </a-select>
           </a-form-model-item>
         </a-col>
         <a-col span="12" v-if="form.activeDateEnable=='1'">
           <a-form-model-item prop="activeDate">
-            <a-range-picker
-              style="width:100%"
-              id="promotionRules-basicInfo-activeDate"
-              :disabledDate="disabledDate"
-              v-model="form.activeDate"
-              :format="dateFormat"
-              :placeholder="['开始时间', '结束时间']" />
+          <a-range-picker
+            style="width:100%"
+            id="promotionRules-basicInfo-activeDate"
+            :disabledDate="disabledDate"
+            v-model="form.activeDate"
+            :format="dateFormat"
+            :placeholder="['开始时间', '结束时间']" />
           </a-form-model-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="15">
+        </a-row>
+        <a-row :gutter="15">
         <a-col span="12">
           <a-form-model-item label="参与客户" prop="buyerLimitEnable">
-            <a-select
-              id="promotionRules-basicInfo-buyerLimitEnable"
-              placeholder="请选择"
-              @change="handleChange('buyerLimitEnable')"
-              v-model="form.buyerLimitEnable"
-              style="width: 100%;">
-              <a-select-option v-for="item in rangeCList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
-            </a-select>
+          <a-select
+            id="promotionRules-basicInfo-buyerLimitEnable"
+            placeholder="请选择"
+            @change="handleChange('buyerLimitEnable')"
+            v-model="form.buyerLimitEnable"
+            style="width: 100%;">
+            <a-select-option v-for="item in rangeCList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
+          </a-select>
           </a-form-model-item>
         </a-col>
         <a-col span="12" v-if="form.buyerLimitEnable=='1'">
           <a-form-model-item prop="buyerSns">
-            <a-button id="promotionRules-basicInfo-choose" type="primary" class="button-success" @click="openCustomerModal=true">选择</a-button>
-            <span style="font-weight: bold;">当前已选:{{ chooseCust.length }}个</span>
+          <a-button id="promotionRules-basicInfo-choose" type="primary" class="button-success" @click="openCustomerModal=true">选择</a-button>
+          <span style="font-weight: bold;">当前已选:{{ chooseCust.length }}个</span>
           </a-form-model-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="15">
+        </a-row>
+        <a-row :gutter="15">
         <a-col span="12">
           <a-form-model-item prop="activeAmountEnable">
-            <template slot="label">
-              <a-popover style="margin-top: 13px;">
-                <template slot="content">即促销品的销售价总额不能高于限值,达到后活动不能参与。</template>
-                <a-icon type="question-circle" theme="twoTone" />
-              </a-popover>
-              <span>活动经费上限</span>
-            </template>
-            <a-select
-              id="promotionRules-basicInfo-activeAmountEnable"
-              placeholder="请选择"
-              @change="handleChange('activeAmountEnable')"
-              v-model="form.activeAmountEnable"
-              style="width: 100%;">
-              <a-select-option v-for="item in rangeList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
-            </a-select>
+          <template slot="label">
+            <a-popover style="margin-top: 13px;">
+            <template slot="content">即促销品的销售价总额不能高于限值,达到后活动不能参与。</template>
+            <a-icon type="question-circle" theme="twoTone" />
+            </a-popover>
+            <span>活动经费上限</span>
+          </template>
+          <a-select
+            id="promotionRules-basicInfo-activeAmountEnable"
+            placeholder="请选择"
+            @change="handleChange('activeAmountEnable')"
+            v-model="form.activeAmountEnable"
+            style="width: 100%;">
+            <a-select-option v-for="item in rangeList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
+          </a-select>
           </a-form-model-item>
         </a-col>
         <a-col span="12" v-if="form.activeAmountEnable=='1'">
           <a-form-model-item prop="activeAmount">
-            <a-input-number
-              id="promotionRules-basicInfo-activeAmount"
-              v-model="form.activeAmount"
-              :min="1"
-              :max="999999"
-              :precision="2"
-              style="width: 85%;margin-right: 5px;"
-              placeholder="请输入活动经费上限(1~999999)"
-              allowClear />
-            <span>万元</span>
+          <a-input-number
+            id="promotionRules-basicInfo-activeAmount"
+            v-model="form.activeAmount"
+            :min="1"
+            :max="999999"
+            :precision="2"
+            style="width: 85%;margin-right: 5px;"
+            placeholder="请输入活动经费上限(1~999999)"
+            allowClear />
+          <span>万元</span>
           </a-form-model-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="15">
+        </a-row>
+        <a-row :gutter="15">
         <a-col span="12">
           <a-form-model-item prop="orderAmountEnable">
-            <template slot="label">
-              <a-popover style="margin-top: 13px;">
-                <template slot="content">即限制每个采购单需达到下限金额才能参与促销。</template>
-                <a-icon type="question-circle" theme="twoTone" />
-              </a-popover>
-              <span>订单起订金额</span>
-            </template>
-            <a-select
-              id="promotionRules-basicInfo-orderAmountEnable"
-              placeholder="请选择"
-              @change="handleChange('orderAmountEnable')"
-              v-model="form.orderAmountEnable"
-              style="width: 100%;">
-              <a-select-option v-for="item in rangeList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
-            </a-select>
+          <template slot="label">
+            <a-popover style="margin-top: 13px;">
+            <template slot="content">即限制每个采购单需达到下限金额才能参与促销。</template>
+            <a-icon type="question-circle" theme="twoTone" />
+            </a-popover>
+            <span>订单起订金额</span>
+          </template>
+          <a-select
+            id="promotionRules-basicInfo-orderAmountEnable"
+            placeholder="请选择"
+            @change="handleChange('orderAmountEnable')"
+            v-model="form.orderAmountEnable"
+            style="width: 100%;">
+            <a-select-option v-for="item in rangeList" :key="item.val" :value="item.val">{{ item.name }}</a-select-option>
+          </a-select>
           </a-form-model-item>
         </a-col>
         <a-col span="12" v-if="form.orderAmountEnable=='1'">
           <a-form-model-item prop="orderAmount">
-            <a-input-number
-              id="promotionRules-basicInfo-orderAmount"
-              v-model="form.orderAmount"
-              :min="1"
-              :max="999999"
-              :precision="2"
-              style="width: 85%;margin-right: 5px;"
-              placeholder="请输入订单起订金额(1~999999)"
-              allowClear />
-            <span>万元</span>
+          <a-input-number
+            id="promotionRules-basicInfo-orderAmount"
+            v-model="form.orderAmount"
+            :min="1"
+            :max="999999"
+            :precision="2"
+            style="width: 85%;margin-right: 5px;"
+            placeholder="请输入订单起订金额(1~999999)"
+            allowClear />
+          <span>万元</span>
           </a-form-model-item>
         </a-col>
-      </a-row>
-      <a-form-model-item label="备注" prop="remark" :label-col="{span: 4}">
+        </a-row>
+        <a-form-model-item label="备注" prop="remark" :label-col="{span: 4}">
         <a-textarea
           id="promotionRules-basicInfo-remark"
           :maxLength="100"
           v-model.trim="form.remark"
           placeholder="请输入备注(最多100个字符)"
           allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="promotionRules-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="promotionRules-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="promotionRules-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="promotionRules-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
     <!-- 选择参与客户 -->
     <choose-customer-modal :openModal="openCustomerModal" :chooseCust="chooseCust" @close="openCustomerModal=false" @ok="handleOk" />
   </a-modal>
@@ -179,6 +181,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 8 },
         wrapperCol: { span: 16 }
@@ -281,13 +284,17 @@ export default {
           if (!this.itemSn && form.id) {
             delete form.id
           }
+          _this.spinning = true
           promoActiveSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.isShow = false
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
+            }else{
+              _this.spinning = false
             }
           })
         } else {

+ 3 - 1
src/views/promotionRulesManagement/promotionRules/editRuleModal.vue

@@ -315,7 +315,6 @@ export default {
       _this.form.promoGoodsList = this.promoGoodsList.length > 0 ? 'a' : ''
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.spinLoading = true
           const form = JSON.parse(JSON.stringify(_this.form))
           form.normalGoodsList = this.normalGoodsList
           form.promoGoodsList = this.promoGoodsList
@@ -329,6 +328,7 @@ export default {
             form.promoAmountPer = ''
           }
           if (!_this.itemSn) { delete form.id }
+          _this.spinLoading = true
           promoRuleSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -337,6 +337,8 @@ export default {
                 _this.spinLoading = false
                 _this.isShow = false
               }, 1000)
+            }else{
+              _this.spinLoading = false
             }
           })
         } else {

+ 55 - 48
src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -8,54 +8,56 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
-    <a-form-model
-      id="bulkWarehousingOrder-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item label="供应商" prop="supplierSn">
-        <a-select
-          placeholder="请选择供应商"
-          allowClear
-          v-model="form.supplierSn"
-          :showSearch="true"
-          option-filter-prop="children"
-          :filter-option="filterOption">
-          <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn" :disabled="item.enableFlag==0">{{ item.supplierName }}</a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="入库类型" prop="sparePartsType">
-        <v-select
-          v-model="form.sparePartsType"
-          ref="sparePartsType"
-          id="bulkWarehousingOrder-basicInfo-sparePartsType"
-          code="SPARE_PARTS_TYPE"
-          placeholder="请选择入库类型"
-          allowClear></v-select>
-      </a-form-model-item>
-      <a-form-model-item label="关联单号" prop="relationNo">
-        <a-input
-          id="bulkWarehousingOrder-relationNo"
-          :maxLength="30"
-          v-model="form.relationNo"
-          placeholder="请输入关联单号(最多30个字符)"
-          allowClear />
-      </a-form-model-item>
-      <a-form-model-item label="入库备注" prop="remark">
-        <a-textarea
-          id="bulkWarehousingOrder-remark"
-          :maxLength="30"
-          v-model="form.remark"
-          placeholder="请输入备注(最多30个字符)"
-          allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="bulkWarehousingOrder-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="bulkWarehousingOrder-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="bulkWarehousingOrder-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="供应商" prop="supplierSn">
+          <a-select
+            placeholder="请选择供应商"
+            allowClear
+            v-model="form.supplierSn"
+            :showSearch="true"
+            option-filter-prop="children"
+            :filter-option="filterOption">
+            <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn" :disabled="item.enableFlag==0">{{ item.supplierName }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="入库类型" prop="sparePartsType">
+          <v-select
+            v-model="form.sparePartsType"
+            ref="sparePartsType"
+            id="bulkWarehousingOrder-basicInfo-sparePartsType"
+            code="SPARE_PARTS_TYPE"
+            placeholder="请选择入库类型"
+            allowClear></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="关联单号" prop="relationNo">
+          <a-input
+            id="bulkWarehousingOrder-relationNo"
+            :maxLength="30"
+            v-model="form.relationNo"
+            placeholder="请输入关联单号(最多30个字符)"
+            allowClear />
+        </a-form-model-item>
+        <a-form-model-item label="入库备注" prop="remark">
+          <a-textarea
+            id="bulkWarehousingOrder-remark"
+            :maxLength="30"
+            v-model="form.remark"
+            placeholder="请输入备注(最多30个字符)"
+            allowClear />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="bulkWarehousingOrder-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="bulkWarehousingOrder-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -75,6 +77,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 5 },
         wrapperCol: { span: 16 }
@@ -103,13 +106,17 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
+          _this.spinning = true
           sparePartsSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.isShow = false
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 69 - 62
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -8,68 +8,70 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
-    <a-form-model
-      id="bulkWarehousingOrder-product-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item label="供应商" prop="supplierSn">{{ (nowData&&nowData.supplierName) || '--' }}</a-form-model-item>
-      <a-form-model-item label="产品编码" prop="productSn">
-        <a-select
-          show-search
-          id="bulkWarehousingOrder-product-productSn"
-          v-model="form.productSn"
-          placeholder="请选择"
-          :filter-option="false"
-          :not-found-content="fetching ? undefined : null"
-          @search="fetchUser"
-          @change="handleChange"
-        >
-          <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-          <a-select-option v-for="item in productData" :key="item.product.productSn + item.product.code" :value="item.product.productSn">{{ item.product.code }}</a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="产品名称" prop="productName">{{ form.productName || '--' }}</a-form-model-item>
-      <a-form-model-item label="原厂编码" prop="productOrigCode">{{ form.productOrigCode || '--' }}</a-form-model-item>
-      <a-form-model-item label="仓库仓位" prop="warehouse">
-        <a-cascader
-          @change="changeWarehouseCascade"
-          v-model="form.warehouse"
-          expand-trigger="hover"
-          :allowClear="false"
-          :options="warehouseCascadeData"
-          :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-          id="bulkWarehousingOrder-product-warehouse"
-          placeholder="请选择仓库仓位"
-          style="width: 100%;" />
-      </a-form-model-item>
-      <a-form-model-item label="成本价" prop="productCost">
-        <a-input-number
-          id="bulkWarehousingOrder-product-productCost"
-          v-model="form.productCost"
-          :precision="2"
-          :min="0"
-          :max="999999"
-          placeholder="请输入"
-          style="width: 100%;" />
-      </a-form-model-item>
-      <a-form-model-item label="数量" prop="productQty">
-        <a-input-number
-          id="bulkWarehousingOrder-product-productQty"
-          v-model="form.productQty"
-          :precision="0"
-          :min="1"
-          :max="999999"
-          placeholder="请输入"
-          style="width: 80%;" /><span>个</span>
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="bulkWarehousingOrder-product-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="bulkWarehousingOrder-product-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="bulkWarehousingOrder-product-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="供应商" prop="supplierSn">{{ (nowData&&nowData.supplierName) || '--' }}</a-form-model-item>
+        <a-form-model-item label="产品编码" prop="productSn">
+          <a-select
+            show-search
+            id="bulkWarehousingOrder-product-productSn"
+            v-model="form.productSn"
+            placeholder="请选择"
+            :filter-option="false"
+            :not-found-content="fetching ? undefined : null"
+            @search="fetchUser"
+            @change="handleChange"
+          >
+            <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+            <a-select-option v-for="item in productData" :key="item.product.productSn + item.product.code" :value="item.product.productSn">{{ item.product.code }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="产品名称" prop="productName">{{ form.productName || '--' }}</a-form-model-item>
+        <a-form-model-item label="原厂编码" prop="productOrigCode">{{ form.productOrigCode || '--' }}</a-form-model-item>
+        <a-form-model-item label="仓库仓位" prop="warehouse">
+          <a-cascader
+            @change="changeWarehouseCascade"
+            v-model="form.warehouse"
+            expand-trigger="hover"
+            :allowClear="false"
+            :options="warehouseCascadeData"
+            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+            id="bulkWarehousingOrder-product-warehouse"
+            placeholder="请选择仓库仓位"
+            style="width: 100%;" />
+        </a-form-model-item>
+        <a-form-model-item label="成本价" prop="productCost">
+          <a-input-number
+            id="bulkWarehousingOrder-product-productCost"
+            v-model="form.productCost"
+            :precision="2"
+            :min="0"
+            :max="999999"
+            placeholder="请输入"
+            style="width: 100%;" />
+        </a-form-model-item>
+        <a-form-model-item label="数量" prop="productQty">
+          <a-input-number
+            id="bulkWarehousingOrder-product-productQty"
+            v-model="form.productQty"
+            :precision="0"
+            :min="1"
+            :max="999999"
+            placeholder="请输入"
+            style="width: 80%;" /><span>个</span>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="bulkWarehousingOrder-product-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="bulkWarehousingOrder-product-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -102,6 +104,7 @@ export default {
     this.fetchUser = debounce(this.fetchUser, 800)
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 5 },
         wrapperCol: { span: 16 }
@@ -192,13 +195,17 @@ export default {
           form.sparePartsSn = this.nowData.sparePartsSn
           form.sparePartsNo = this.nowData.sparePartsNo
           form.supplierSn = this.nowData.supplierSn
+          _this.spinning = true
           sparePartsSaveDetail(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.isShow = false
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
+            }else{
+              _this.spinning = false
             }
           })
         } else {

+ 40 - 35
src/views/salesManagement/backorder/detailModal.vue

@@ -8,41 +8,43 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="960">
-    <div style="padding: 0 12px;text-align: right;">
-      <a-button id="backorderDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')" style="margin-right: 15px;">打印预览</a-button>
-      <a-button type="primary" id="backorderDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-    </div>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="backorderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="2">
-            <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="backorderDetail-cont">
-      <!-- alert -->
-      <a-alert type="info" showIcon style="margin-bottom:10px">
-        <div slot="message">
-          缺货总款数:<strong>{{ detailData ? ((detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--') : '--' }}</strong>,
-          缺货总数量:<strong>{{ detailData ? ((detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--') : '--' }}</strong>,
-          缺货总售价:<strong>{{ detailData ? ((detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--') : '--' }}</strong>
-        </div></a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        :scroll="{ x: 1040, y: 500 }"
-        bordered>
-      </s-table>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="padding: 0 12px;text-align: right;">
+        <a-button id="backorderDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')" style="margin-right: 15px;">打印预览</a-button>
+        <a-button type="primary" id="backorderDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+      </div>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="backorderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions size="small" :column="2">
+              <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="backorderDetail-cont">
+        <!-- alert -->
+        <a-alert type="info" showIcon style="margin-bottom:10px">
+          <div slot="message">
+            缺货总款数:<strong>{{ detailData ? ((detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--') : '--' }}</strong>,
+            缺货总数量:<strong>{{ detailData ? ((detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--') : '--' }}</strong>,
+            缺货总售价:<strong>{{ detailData ? ((detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--') : '--' }}</strong>
+          </div></a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :scroll="{ x: 1040, y: 500 }"
+          bordered>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <div id="print"></div>
   </a-modal>
@@ -67,6 +69,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       detailData: null, //  详情数据
       // 表头
       columns: [
@@ -109,7 +112,9 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
+      _this.spinning = true
       oosDetailPrint({ sn: this.itemSn }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 82 - 77
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -1,83 +1,85 @@
 <template>
   <div class="salesDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
-      <template slot="subTitle">
-        <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
-      </template>
-      <template slot="extra">
-        <a-button
-          key="4"
-          type="primary"
-          class="button-error"
-          id="salesDetail-xs-print-btn"
-          :disabled="localDataSource.length==0"
-          @click="handlePrint('SALES_BILL')">销售打印</a-button>
-        <a-button
-          key="3"
-          type="primary"
-          class="button-info"
-          id="salesDetail-xsfl-print-btn"
-          :disabled="localDataSource.length==0"
-          @click="handlePrint('SALES_BILL_TYPE')">销售分类打印</a-button>
-        <a-button
-          key="2"
-          type="primary"
-          class="button-success"
-          id="salesDetail-fhdy-print-btn"
-          :disabled="localDataSource.length==0"
-          @click="handlePrint('DISPATCH_BILL')">发货打印</a-button>
-        <a-button
-          key="1"
-          type="primary"
-          class="button-warning"
-          id="salesDetail-fhfl-print-btn"
-          :disabled="localDataSource.length==0"
-          @click="handlePrint('DISPATCH_BILL_TYPE')">发货分类打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="salesDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="3" v-if="detailData!=null">
-            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货地址" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity.shippingAddrProvinceName || '--' }}{{ detailData.salesBillExtEntity.shippingAddrCityName || '--' }}{{ detailData.salesBillExtEntity.shippingAddrCountyName || '--' }}{{ detailData.salesBillExtEntity.shippingAddr || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收款方式">{{ detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货人" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货电话" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
-        <div slot="message">
-          <span v-if="$route.params.type!='stockOut'">总销售数量:<strong>{{ detailData.totalSalesQty || 0 }}</strong>;</span>
-          本次下推数量:<strong>{{ detailData.totalQty || 0 }}</strong>;
-          </strong></strong></div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="$route.params.type=='stockOut' ? outColumns : columns"
-        :data="loadData"
-        :scroll="{ x: 1070, y: 500 }"
-        bordered>
-        <!-- 产品编码 -->
-        <template slot="productCode" slot-scope="text, record">
-          <a-badge count="促" v-if="record.promotionFlag == 1">
-            <div style="padding-right: 15px;">{{ text }}</div>
-          </a-badge>
-          <span v-else>{{ text }}</span>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
+        <template slot="subTitle">
+          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
         </template>
-      </s-table>
-    </a-card>
+        <template slot="extra">
+          <a-button
+            key="4"
+            type="primary"
+            class="button-error"
+            id="salesDetail-xs-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('SALES_BILL')">销售打印</a-button>
+          <a-button
+            key="3"
+            type="primary"
+            class="button-info"
+            id="salesDetail-xsfl-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('SALES_BILL_TYPE')">销售分类打印</a-button>
+          <a-button
+            key="2"
+            type="primary"
+            class="button-success"
+            id="salesDetail-fhdy-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('DISPATCH_BILL')">发货打印</a-button>
+          <a-button
+            key="1"
+            type="primary"
+            class="button-warning"
+            id="salesDetail-fhfl-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('DISPATCH_BILL_TYPE')">发货分类打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="salesDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions size="small" :column="3" v-if="detailData!=null">
+              <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货地址" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity.shippingAddrProvinceName || '--' }}{{ detailData.salesBillExtEntity.shippingAddrCityName || '--' }}{{ detailData.salesBillExtEntity.shippingAddrCountyName || '--' }}{{ detailData.salesBillExtEntity.shippingAddr || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收款方式">{{ detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货电话" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
+          <div slot="message">
+            <span v-if="$route.params.type!='stockOut'">总销售数量:<strong>{{ detailData.totalSalesQty || 0 }}</strong>;</span>
+            本次下推数量:<strong>{{ detailData.totalQty || 0 }}</strong>;
+            </strong></strong></div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="$route.params.type=='stockOut' ? outColumns : columns"
+          :data="loadData"
+          :scroll="{ x: 1070, y: 500 }"
+          bordered>
+          <!-- 产品编码 -->
+          <template slot="productCode" slot-scope="text, record">
+            <a-badge count="促" v-if="record.promotionFlag == 1">
+              <div style="padding-right: 15px;">{{ text }}</div>
+            </a-badge>
+            <span v-else>{{ text }}</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 分类打印 -->
     <choose-type-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <!-- 打印 -->
@@ -95,6 +97,7 @@ export default {
   data () {
     return {
       disabled: false,
+      spinning: false,
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -175,7 +178,9 @@ export default {
         type: this.nowPrintType,
         dispatchBillSn: this.$route.params.sn
       }
+      _this.spinning = true
       dispatchDetailPrint(Object.assign(params, productType || {})).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 62 - 55
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -9,61 +9,63 @@
     :footer="null"
     @cancel="cancel"
   >
-    <a-form-model
-      id="chooseCustom-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-row :gutter="15">
-        <a-col :span="24">
-          <a-form-model-item label="客户名称" prop="buyerSn">
-            <custList id="chooseCustom-buyerSn" defValKey="buyerSn" @change="custChange" v-model="form.buyerSn"></custList>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="24">
-          <a-form-model-item label="联系人">
-            {{ form.consigneeName }}
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="24">
-          <a-form-model-item label="联系电话">
-            {{ form.consigneeTel }}
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="24">
-          <a-form-model-item label="客户地址">
-            {{ form.customerAddr }}
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="24">
-          <a-form-model-item label="收款方式" prop="settleStyleSn">
-            <settleStyle id="chooseCustom-settleStyleSn" v-model="form.settleStyleSn"></settleStyle>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="24">
-          <a-form-model-item label="选择收货地址" prop="shippingAddr">
-            <a-select id="chooseCustom-shippingAddr" v-model="form.shippingAddr" placeholder="请选择收货地址">
-              <a-select-option v-for="item in addrList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
-        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
-      </a-form-model-item>
-    </a-form-model>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <a-form-model-item label="客户名称" prop="buyerSn">
+              <custList id="chooseCustom-buyerSn" defValKey="buyerSn" @change="custChange" v-model="form.buyerSn"></custList>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <a-form-model-item label="联系人">
+              {{ form.consigneeName }}
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="联系电话">
+              {{ form.consigneeTel }}
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <a-form-model-item label="客户地址">
+              {{ form.customerAddr }}
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <a-form-model-item label="收款方式" prop="settleStyleSn">
+              <settleStyle id="chooseCustom-settleStyleSn" v-model="form.settleStyleSn"></settleStyle>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <a-form-model-item label="选择收货地址" prop="shippingAddr">
+              <a-select id="chooseCustom-shippingAddr" v-model="form.shippingAddr" placeholder="请选择收货地址">
+                <a-select-option v-for="item in addrList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -81,6 +83,7 @@ export default {
   data () {
     return {
       opened: this.show,
+      spinning: false,
       title: '选择客户',
       confirmLoading: false,
       formItemLayout: {
@@ -171,6 +174,7 @@ export default {
       const _this = this
       const form = this.form
       console.log(form, 'save data')
+      _this.spinning = true
       salesSave(form).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
@@ -179,6 +183,9 @@ export default {
             _this.$emit('updateData')
           }
           _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },

+ 136 - 119
src/views/salesManagement/salesQuery/edit.vue

@@ -13,134 +13,136 @@
         <a-button key="1" type="primary" id="salesEdit-print-btn">快速打印</a-button>
       </template> -->
     </a-page-header>
-    <a-card :bordered="false" class="salesEdit-cont">
-      <div slot="title">
-        <div class="p-title">
-          选择产品
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card :bordered="false" class="salesEdit-cont">
+        <div slot="title">
+          <div class="p-title">
+            选择产品
+          </div>
         </div>
-      </div>
-      <!-- 查询配件列表 -->
-      <queryPart ref="partQuery" :buyerSn="detailData&&detailData.buyerSn" :newLoading="isInster" @add="insterProduct"></queryPart>
-    </a-card>
-    <a-card :bordered="false" class="salesEdit-cont">
-      <div slot="title">
-        <a-row :gutter="15" type="flex">
-          <a-col :span="2">
-            <div class="p-title">
-              已选产品
-            </div>
-          </a-col>
-          <a-col :span="16">
-            <div class="p-notes">
-              <a-icon style="color: #FF9900;" type="bell" /> 已选产品可参加<span>{{ activeName }}</span>的促销活动,促销产品为指定产品
+        <!-- 查询配件列表 -->
+        <queryPart ref="partQuery" :buyerSn="detailData&&detailData.buyerSn" :newLoading="isInster" @add="insterProduct"></queryPart>
+      </a-card>
+      <a-card :bordered="false" class="salesEdit-cont">
+        <div slot="title">
+          <a-row :gutter="15" type="flex">
+            <a-col :span="2">
+              <div class="p-title">
+                已选产品
+              </div>
+            </a-col>
+            <a-col :span="16">
+              <div class="p-notes">
+                <a-icon style="color: #FF9900;" type="bell" /> 已选产品可参加<span>{{ activeName }}</span>的促销活动,促销产品为指定产品
+              </div>
+            </a-col>
+            <!-- <a-col :span="6">
+              <div style="float:right;overflow: hidden;">
+                <a-button size="small" id="salesEdit-dru">导入明细</a-button>
+                <a-button
+                  size="small"
+                  type="primary"
+                  @click="delSalerDetailAll"
+                  :loading="delLoading"
+                  style="margin-left: 10px"
+                  id="salesEdit-del-all">整单删除</a-button>
+              </div>
+            </a-col> -->
+          </a-row>
+        </div>
+        <!-- 总计 -->
+        <a-alert type="info">
+          <div slot="message" class="total-bar">
+            <div>
+              总售价:<strong>¥{{ detailData&&detailData.totalCommonAmount || 0 }}</strong>;
+              总款数:<strong>{{ detailData&&detailData.totalCommonCategory || 0 }}</strong>;
+              总数量:<strong>{{ detailData&&detailData.totalCommonQty || 0 }}</strong>;
             </div>
-          </a-col>
-          <!-- <a-col :span="6">
-            <div style="float:right;overflow: hidden;">
-              <a-button size="small" id="salesEdit-dru">导入明细</a-button>
-              <a-button
-                size="small"
-                type="primary"
-                @click="delSalerDetailAll"
-                :loading="delLoading"
-                style="margin-left: 10px"
-                id="salesEdit-del-all">整单删除</a-button>
+            <div>
             </div>
-          </a-col> -->
-        </a-row>
-      </div>
-      <!-- 总计 -->
-      <a-alert type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            总售价:<strong>¥{{ detailData&&detailData.totalCommonAmount || 0 }}</strong>;
-            总款数:<strong>{{ detailData&&detailData.totalCommonCategory || 0 }}</strong>;
-            总数量:<strong>{{ detailData&&detailData.totalCommonQty || 0 }}</strong>;
-          </div>
-          <div>
           </div>
-        </div>
-      </a-alert>
+        </a-alert>
 
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x:1190, y: 300 }"
-        bordered>
-        <!-- 产品名称 -->
-        <template slot="productName" slot-scope="text, record">
-          <span>{{ text }}</span>
-          <a-badge :number-style="{ backgroundColor: '#52c41a' }" count="活动" v-if="record.promotableFlag == 1"></a-badge>
-        </template>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x:1190, y: 300 }"
+          bordered>
+          <!-- 产品名称 -->
+          <template slot="productName" slot-scope="text, record">
+            <span>{{ text }}</span>
+            <a-badge :number-style="{ backgroundColor: '#52c41a' }" count="活动" v-if="record.promotableFlag == 1"></a-badge>
+          </template>
 
-        <!-- 销售数量 -->
-        <template slot="salesNums" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            :max="999999"
-            :min="1"
-            :precision="0"
-            @change="onCellChange(record, $event)" />
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="primary"
-            :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-          >删除</a-button>
-          <a-button
-            size="small"
-            type="primary"
-            :loading="delLoading"
-            class="button-warning"
-            @click="handleSelCx(record)"
-            v-if="record.promotableFlag == 1"
-          >选择促销品</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-card :bordered="false" class="salesEdit-cont">
-      <div slot="title">
-        <div class="p-title">
-          已选促销品
-        </div>
-      </div>
-      <!-- 总计 -->
-      <a-alert type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            总成本:<strong>¥{{ detailData&&detailData.totalPromoCost || 0 }}</strong>;
-            总款数:<strong>{{ detailData&&detailData.totalPromoCategory || 0 }}</strong>;
-            总数量:<strong>{{ detailData&&detailData.totalPromoQty || 0 }}</strong>;
+          <!-- 销售数量 -->
+          <template slot="salesNums" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              :max="999999"
+              :min="1"
+              :precision="0"
+              @change="onCellChange(record, $event)" />
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="primary"
+              :loading="delLoading"
+              class="button-error"
+              @click="handleDel(record)"
+            >删除</a-button>
+            <a-button
+              size="small"
+              type="primary"
+              :loading="delLoading"
+              class="button-warning"
+              @click="handleSelCx(record)"
+              v-if="record.promotableFlag == 1"
+            >选择促销品</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-card :bordered="false" class="salesEdit-cont">
+        <div slot="title">
+          <div class="p-title">
+            已选促销品
           </div>
-          <div>
+        </div>
+        <!-- 总计 -->
+        <a-alert type="info">
+          <div slot="message" class="total-bar">
+            <div>
+              总成本:<strong>¥{{ detailData&&detailData.totalPromoCost || 0 }}</strong>;
+              总款数:<strong>{{ detailData&&detailData.totalPromoCategory || 0 }}</strong>;
+              总数量:<strong>{{ detailData&&detailData.totalPromoQty || 0 }}</strong>;
+            </div>
+            <div>
+            </div>
           </div>
+        </a-alert>
+        <!-- 已选促销品列表 -->
+        <queryPromotable ref="promotable" :salesBillSn="$route.params.sn" :delLoading="delLoading" @onCellChange="onCellChange" @del="handleDel"></queryPromotable>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            size="large"
+            style="width: 150px;"
+            type="primary"
+            class="button-primary"
+            @click="handleSubmit()"
+            id="productInfoList-handleSubmit">提交</a-button>
         </div>
-      </a-alert>
-      <!-- 已选促销品列表 -->
-      <queryPromotable ref="promotable" :salesBillSn="$route.params.sn" :delLoading="delLoading" @onCellChange="onCellChange" @del="handleDel"></queryPromotable>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="productInfoList-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+      </a-affix>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @cancel="openModal=false" />
     <!-- 添加产品 -->
@@ -168,6 +170,7 @@ export default {
   components: { STable, VSelect, queryPart, queryPromotable, chooseCustomModal, EditableCell, ChooseActive },
   data () {
     return {
+      spinning: false,
       salesBillSn: null, // 销售单sn
       disabled: false, //  查询、重置按钮是否可操作
       isInster: false, // 是否正在添加产品
@@ -214,6 +217,7 @@ export default {
       console.log(row, value)
       if (row) {
         row['qty'] = Number(value)
+        this.spinning = true
         salesDetailUpdateQty({
           salesBillDetailSn: row.salesBillDetailSn,
           qty: row.qty,
@@ -224,6 +228,7 @@ export default {
           if (res.status == 200) {
             this.$message.success(res.message)
           }
+          this.spinning = false
         })
       }
     },
@@ -302,6 +307,7 @@ export default {
     saveNewProduct (row, promotionFlag) {
       this.$message.loading('正在添加产品...', 1)
       this.isInster = true
+      this.spinning = true
       salesDetailInsert({
         packQty: row.productPackQty,
         productSn: row.productSn,
@@ -322,6 +328,9 @@ export default {
         if (res.status == 200) {
           this.resetSearchForm()
           this.$message.success('产品添加成功', 2.5)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         this.isInster = false
       })
@@ -338,10 +347,14 @@ export default {
     },
     // 提交销售单
     handleSubmit () {
+      this.spinning = true
       salesWriteSubmit({ salesBillSn: this.salesBillSn }).then(res => {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -375,12 +388,16 @@ export default {
         }))
       })
       this.isInster == true
+      this.spinning = true
       addPromoGoods(temp).then(res => {
         if (res.status == 200) {
           this.$refs.promotable.getData()
           this.getOrderDetail()
           this.newActive = false
           this.isInster == false
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     }

+ 54 - 47
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -9,53 +9,55 @@
     :footer="null"
     @cancel="cancel"
   >
-    <a-form-model
-      id="chooseCustom-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="客户名称" required>
-            <custList id="chooseCustom-dealerName" ref="custList" @dealerDetail="dealerDetail" @change="custChange"></custList>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="联系人">
-            {{ form.contactName || '--' }}
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="6">
-          <a-form-model-item label="联系手机">
-            {{ form.contactTel || '--' }}
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="10">
-          <a-form-model-item label="客户地址">
-            <p style="line-height: 1.5em;margin: 0;">{{ form.provinceName }}{{ form.cityName }}{{ form.countyName }}{{ form.customerAddr }}</p>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="是否抓单" prop="grabFlag">
-            <v-select code="FLAG" id="chooseCustom-grabFlag" v-model="form.grabFlag" allowClear placeholder="请选择"></v-select>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
-        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
-      </a-form-model-item>
-    </a-form-model>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="客户名称" required>
+              <custList id="chooseCustom-dealerName" ref="custList" @dealerDetail="dealerDetail" @change="custChange"></custList>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="联系人">
+              {{ form.contactName || '--' }}
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item label="联系手机">
+              {{ form.contactTel || '--' }}
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="10">
+            <a-form-model-item label="客户地址">
+              <p style="line-height: 1.5em;margin: 0;">{{ form.provinceName }}{{ form.cityName }}{{ form.countyName }}{{ form.customerAddr }}</p>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="是否抓单" prop="grabFlag">
+              <v-select code="FLAG" id="chooseCustom-grabFlag" v-model="form.grabFlag" allowClear placeholder="请选择"></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -72,6 +74,7 @@ export default {
   data () {
     return {
       opened: this.show,
+      spinning: false,
       title: '选择客户',
       confirmLoading: false,
       formItemLayout: {
@@ -146,11 +149,15 @@ export default {
       const _this = this
       const form = this.form
       console.log(form, 'save data')
+      _this.spinning = true
       salesReturnInsert(form).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$emit('ok', res.data)
           _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },

+ 48 - 39
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -7,45 +7,47 @@
         <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName }}</span>
       </template>
     </a-page-header>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <div>
-        <a-button type="primary" :loading="loading" class="button-error" @click="backStock">批量返库</a-button>
-      </div>
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1500, y: 300 }"
-        bordered>
-        <!-- 返库数量 -->
-        <template slot="backStockQty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.backStockQty"
-            :max="record.qty"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'backStockQty', $event)" />
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 0 0 40px;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="salesReturn-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <div>
+          <a-button type="primary" :loading="loading" class="button-error" @click="backStock">批量返库</a-button>
+        </div>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1500, y: 300 }"
+          bordered>
+          <!-- 返库数量 -->
+          <template slot="backStockQty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.backStockQty"
+              :max="record.qty"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'backStockQty', $event)" />
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 0 0 40px;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            size="large"
+            style="width: 150px;"
+            type="primary"
+            class="button-primary"
+            @click="handleSubmit()"
+            id="salesReturn-handleSubmit">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -68,6 +70,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       orderId: null,
       orderSn: null,
       buyerSn: null,
@@ -229,12 +232,14 @@ export default {
     // 品检
     submitCheck (data) {
       this.loading = true
+      this.spinning = true
       updateBackStockQty(data).then(res => {
         if (res.status == 200) {
           this.resetSearchForm(true)
           this.$message.success(res.message)
         }
         this.loading = false
+        this.spinning = false
       })
     },
     // 重置列表
@@ -254,10 +259,14 @@ export default {
     },
     // 提交销售单
     handleSubmit () {
+      this.spinning = true
       salesReturnCheck({ salesReturnBillSn: this.orderSn }).then(res => {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     }

+ 70 - 62
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -12,71 +12,72 @@
         <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
       </template> -->
     </a-page-header>
-
-    <a-card size="small" :bordered="false" class="pages-wrap" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
-      <!-- 查询配件列表 -->
-      <queryPart :buyerSn="$route.params.buyerSn" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert style="margin-bottom: 10px;" type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            <span>退货总金额:{{ ordeDetail&&ordeDetail.totalAmount }}元;</span>
-            <span>退货总数量:{{ ordeDetail&&ordeDetail.totalQty }};</span>
-          </div>
-          <div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="pages-wrap" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
+        <!-- 查询配件列表 -->
+        <queryPart :buyerSn="$route.params.buyerSn" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert style="margin-bottom: 10px;" type="info">
+          <div slot="message" class="total-bar">
+            <div>
+              <span>退货总金额:{{ ordeDetail&&ordeDetail.totalAmount }}元;</span>
+              <span>退货总数量:{{ ordeDetail&&ordeDetail.totalQty }};</span>
+            </div>
+            <div>
+            </div>
           </div>
-        </div>
-      </a-alert>
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1500, y: 300 }"
-        bordered>
-        <!-- 本次退货数量 -->
-        <template slot="qty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            :max="999999"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'qty', $event)" />
-        </template>
-        <!-- 退货原因 -->
-        <template slot="remark" slot-scope="text, record">
-          <a-input placeholder="30个字符内" maxlength="30" v-model="record.remark" @blur="updateRemark(record)"></a-input>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+        </a-alert>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1500, y: 300 }"
+          bordered>
+          <!-- 本次退货数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              :max="999999"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'qty', $event)" />
+          </template>
+          <!-- 退货原因 -->
+          <template slot="remark" slot-scope="text, record">
+            <a-input placeholder="30个字符内" maxlength="30" v-model="record.remark" @blur="updateRemark(record)"></a-input>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="primary"
+              :loading="delLoading"
+              class="button-error"
+              @click="handleDel(record)"
+              id="salesReturn-Del">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
           <a-button
-            size="small"
+            size="large"
+            style="width: 150px;"
             type="primary"
-            :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-            id="salesReturn-Del">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="salesReturn-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+            class="button-primary"
+            @click="handleSubmit()"
+            id="salesReturn-handleSubmit">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -102,6 +103,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       orderId: null,
       orderSn: null,
       buyerSn: null,
@@ -169,6 +171,7 @@ export default {
     },
     // 修改退货原因
     updateRemark (row) {
+      this.spinning = true
       salesReturnDetailUpdateReason({
         salesReturnDetailSn: row.salesReturnDetailSn,
         remark: row.remark
@@ -177,6 +180,7 @@ export default {
           this.resetSearchForm(true)
           this.$message.success(res.message)
         }
+        this.spinning = false
       })
     },
     // 重置列表
@@ -230,21 +234,25 @@ export default {
         'productSn': row.productSn,
         'qty': row.qty
       }
+      this.spinning = true
       salesReturnDetailInsert(params).then(res => {
         if (res.status == 200) {
           this.resetSearchForm(true)
           this.$message.success(res.message)
         }
         this.isInster = false
+        this.spinning = false
       })
     },
     // 提交销售单
     handleSubmit () {
+      this.spinning = true
       salesReturnSubmit({ salesReturnBillSn: this.orderSn }).then(res => {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
         }
+        this.spinning = false
       })
     }
   },

+ 70 - 60
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -12,69 +12,70 @@
         <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
       </template> -->
     </a-page-header>
-
-    <a-card size="small" :bordered="false" class="pages-wrap" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
-      <!-- 查询配件列表 -->
-      <queryPart ref="queryPart" :buyerSn="$route.params.buyerSn" grabFlag="1" :newLoading="isInster" @add="saveProduct"></queryPart>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert style="margin-bottom: 10px;" type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            <span>退货总金额:{{ ordeDetail&&ordeDetail.totalAmount }}元;</span>
-            <span>退货总数量:{{ ordeDetail&&ordeDetail.totalQty }};</span>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="pages-wrap" v-if="ordeDetail&&ordeDetail.salesReturnBillSource=='SALES'">
+        <!-- 查询配件列表 -->
+        <queryPart ref="queryPart" :buyerSn="$route.params.buyerSn" grabFlag="1" :newLoading="isInster" @add="saveProduct"></queryPart>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert style="margin-bottom: 10px;" type="info">
+          <div slot="message" class="total-bar">
+            <div>
+              <span>退货总金额:{{ ordeDetail&&ordeDetail.totalAmount }}元;</span>
+              <span>退货总数量:{{ ordeDetail&&ordeDetail.totalQty }};</span>
+            </div>
           </div>
-        </div>
-      </a-alert>
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1500, y: 300 }"
-        bordered>
-        <!-- 本次退货数量 -->
-        <template slot="qty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            :max="999999"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'qty', $event)" />
-        </template>
-        <!-- 退货原因 -->
-        <template slot="remark" slot-scope="text, record">
-          <a-input placeholder="30个字符内" maxlength="30" v-model="record.remark" @blur="updateRemark(record)"></a-input>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+        </a-alert>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1500, y: 300 }"
+          bordered>
+          <!-- 本次退货数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              :max="999999"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'qty', $event)" />
+          </template>
+          <!-- 退货原因 -->
+          <template slot="remark" slot-scope="text, record">
+            <a-input placeholder="30个字符内" maxlength="30" v-model="record.remark" @blur="updateRemark(record)"></a-input>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="primary"
+              :loading="delLoading"
+              class="button-error"
+              @click="handleDel(record)"
+              id="salesReturn-Del">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
           <a-button
-            size="small"
+            size="large"
+            style="width: 150px;"
             type="primary"
-            :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-            id="salesReturn-Del">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="salesReturn-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+            class="button-primary"
+            @click="handleSubmit()"
+            id="salesReturn-handleSubmit">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -100,6 +101,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       orderId: null,
       orderSn: null,
       buyerSn: null,
@@ -160,6 +162,7 @@ export default {
           this.$message.info('本次退货数量不可大于剩余可退数量')
           this.$refs.table.refresh(true)
         } else {
+          this.spinning = true
           salesReturnDetailUpdateQty({
             salesReturnDetailSn: row.salesReturnDetailSn,
             qty: row.qty
@@ -168,12 +171,14 @@ export default {
               this.resetSearchForm(true)
               this.$message.success(res.message)
             }
+            this.spinning = false
           })
         }
       }
     },
     // 修改退货原因
     updateRemark (row) {
+      this.spinning = true
       salesReturnDetailUpdateReason({
         salesReturnDetailSn: row.salesReturnDetailSn,
         remark: row.remark
@@ -182,6 +187,7 @@ export default {
           this.resetSearchForm(true)
           this.$message.success(res.message)
         }
+        this.spinning = false
       })
     },
     // 重置列表
@@ -239,6 +245,7 @@ export default {
         'productSn': row.productSn,
         'qty': row.qty
       }
+      this.spinning = true
       salesReturnDetailInsert(params).then(res => {
         if (res.status == 200) {
           this.resetSearchForm(true)
@@ -246,15 +253,18 @@ export default {
           this.$refs.queryPart.refreshData()
         }
         this.isInster = false
+        this.spinning = false
       })
     },
     // 提交销售单
     handleSubmit () {
+      this.spinning = true
       salesReturnSubmit({ salesReturnBillSn: this.orderSn }).then(res => {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
         }
+        this.spinning = false
       })
     }
   },

+ 110 - 85
src/views/salesManagement/waitDispatch/edit.vue

@@ -13,96 +13,98 @@
         <a-button key="1" type="primary" id="waitDispatch-print-btn">快速打印</a-button>
       </template> -->
     </a-page-header>
-    <a-card :bordered="false" class="waitDispatch-cont" v-if="salesBillSn">
-      <!-- 查询配件列表 -->
-      <queryPart
-        ref="partQuery"
-        :salesBillSn="salesBillSn"
-        :detailData="detailData"
-        :newLoading="isInster"
-        @oneDispatch="oneDispatch"
-        @cancelProduct="cancelProduct"
-        @addProduct="insterProduct"></queryPart>
-    </a-card>
-    <a-card :bordered="false" class="waitDispatch-cont">
-      <div slot="title">
-        <div class="p-title">
-          待下推产品
-        </div>
-      </div>
-      <div style="margin: 0 0 10px 0;">
-        <a-button
-          type="primary"
-          @click="delSalerDetailAll"
-          :loading="delLoading"
-          id="waitDispatch-del-all">批量移除</a-button>
-      </div>
-      <!-- 总计 -->
-      <a-alert type="info" v-if="totalData">
-        <div slot="message" class="total-bar">
-          <div>
-            本次下推款数:<strong>¥{{ totalData&&totalData.totalCategory || 0 }}</strong>;
-            本次下推数量:<strong>{{ totalData&&totalData.totalQty || 0 }}</strong>;
-          </div>
-          <div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card :bordered="false" class="waitDispatch-cont" v-if="salesBillSn">
+        <!-- 查询配件列表 -->
+        <queryPart
+          ref="partQuery"
+          :salesBillSn="salesBillSn"
+          :detailData="detailData"
+          :newLoading="isInster"
+          @oneDispatch="oneDispatch"
+          @cancelProduct="cancelProduct"
+          @addProduct="insterProduct"></queryPart>
+      </a-card>
+      <a-card :bordered="false" class="waitDispatch-cont">
+        <div slot="title">
+          <div class="p-title">
+            待下推产品
           </div>
         </div>
-      </a-alert>
-
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :showPagination="false"
-        :scroll="{ x:1150, y: 300 }"
-        bordered>
-        <!-- 产品编码 -->
-        <template slot="productCode" slot-scope="text, record">
-          <a-badge count="促" v-if="record.promotionFlag == 1">
-            <div style="padding-right: 15px;">{{ text }}</div>
-          </a-badge>
-          <span v-else>{{ text }}</span>
-        </template>
-        <!-- 本次下推数 -->
-        <template slot="salesNums" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            :max="999999"
-            :min="1"
-            :precision="0"
-            @change="onCellChange(record.id, 'qty', $event)" />
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+        <div style="margin: 0 0 10px 0;">
           <a-button
-            size="small"
             type="primary"
+            @click="delSalerDetailAll"
             :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-          >移除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          :loading="loading"
-          id="productInfoList-handleSubmit">下推</a-button>
-      </div>
-    </a-affix>
+            id="waitDispatch-del-all">批量移除</a-button>
+        </div>
+        <!-- 总计 -->
+        <a-alert type="info" v-if="totalData">
+          <div slot="message" class="total-bar">
+            <div>
+              本次下推款数:<strong>¥{{ totalData&&totalData.totalCategory || 0 }}</strong>;
+              本次下推数量:<strong>{{ totalData&&totalData.totalQty || 0 }}</strong>;
+            </div>
+            <div>
+            </div>
+          </div>
+        </a-alert>
+
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :showPagination="false"
+          :scroll="{ x:1150, y: 300 }"
+          bordered>
+          <!-- 产品编码 -->
+          <template slot="productCode" slot-scope="text, record">
+            <a-badge count="促" v-if="record.promotionFlag == 1">
+              <div style="padding-right: 15px;">{{ text }}</div>
+            </a-badge>
+            <span v-else>{{ text }}</span>
+          </template>
+          <!-- 本次下推数 -->
+          <template slot="salesNums" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              :max="999999"
+              :min="1"
+              :precision="0"
+              @change="onCellChange(record.id, 'qty', $event)" />
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="primary"
+              :loading="delLoading"
+              class="button-error"
+              @click="handleDel(record)"
+            >移除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            size="large"
+            style="width: 150px;"
+            type="primary"
+            class="button-primary"
+            @click="handleSubmit()"
+            :loading="loading"
+            id="productInfoList-handleSubmit">下推</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -118,6 +120,7 @@ export default {
   components: { STable, VSelect, queryPart, EditableCell },
   data () {
     return {
+      spinning: false,
       salesBillSn: null, // 销售单sn
       disabled: false, //  查询、重置按钮是否可操作
       isInster: false, // 是否正在添加产品
@@ -212,6 +215,7 @@ export default {
         this.dataSource = dataSource
       }
       if (key == 'qty') {
+        this.spinning = true
         updateQty({
           dispatchBillDetailSn: row.dispatchBillDetailSn,
           qty: row.qty,
@@ -221,6 +225,9 @@ export default {
           if (res.status == 200) {
             this.$refs.partQuery.resetCurForm()
             this.$message.success(res.message)
+            this.spinning = false
+          } else {
+            this.spinning = false
           }
         })
       }
@@ -278,6 +285,7 @@ export default {
     deleteFun (row, type) {
       const _this = this
       _this.delLoading = true
+      _this.spinning = true
       deleteBatch(type == 0 ? [row.dispatchBillDetailSn] : row).then(res => {
         if (res.status == 200) {
           _this.resetSearchForm(true)
@@ -290,6 +298,9 @@ export default {
             _this.selectedRowKeys.splice(ind, 1)
           }
           _this.$message.success(res.message)
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
         _this.delLoading = false
       })
@@ -305,11 +316,15 @@ export default {
     saveNewProduct (list) {
       this.$message.loading('正在添加产品...', 1)
       this.isInster = true
+      this.spinning = true
       insertBatchOfWaitDispatch(list).then(res => {
         if (res.status == 200) {
           this.resetSearchForm()
           this.$refs.partQuery.resetCurForm()
           this.$message.success('添加成功', 2.5)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         this.isInster = false
       })
@@ -319,11 +334,15 @@ export default {
       // 防止多次添加产品
       this.$message.loading('正在批量取消产品...', 1)
       this.isInster = true
+      this.spinning = true
       salesDetailUpdateCancelQty(list).then(res => {
         if (res.status == 200) {
           this.resetSearchForm()
           this.$refs.partQuery.resetCurForm()
           this.$message.success(res.message, 2.5)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         this.isInster = false
       })
@@ -331,10 +350,14 @@ export default {
     // 一键下推
     oneDispatch () {
       this.isInster = true
+      this.spinning = true
       salesDetailDispatchByOneKey({ salesBillSn: this.$route.params.salesBillSn }).then(res => {
         if (res.status == 200) {
           this.resetSearchForm()
           this.$refs.partQuery.resetCurForm()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         this.isInster = false
       })
@@ -354,6 +377,7 @@ export default {
       this.delLoading = true
       this.isInster = true
       this.loading = true
+      this.spinning = true
       pushDown({ dispatchBillSn: this.$route.params.dispatchBillSn }).then(res => {
         if (res.status == 200) {
           this.handleBack()
@@ -362,6 +386,7 @@ export default {
         this.delLoading = false
         this.isInster = false
         this.loading = false
+        this.spinning = false
       })
     }
   },

+ 72 - 65
src/views/setting/noticeManagement/editModal.vue

@@ -10,71 +10,73 @@
     :width="960">
     <!-- 表单 -->
     <div>
-      <a-form-model
-        id="noticeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="类别" prop="type">
-          <v-select code="NOTITY_BIZ_TYPE" id="noticeEdit-type" v-model="form.type" allowClear placeholder="请选择类别"></v-select>
-        </a-form-model-item>
-        <a-form-model-item label="可见性" prop="toAppName">
-          <v-select code="NOTITY_APP_TYPE" id="noticeEdit-toAppName" v-model="form.toAppName" allowClear placeholder="请选择可见性"></v-select>
-        </a-form-model-item>
-        <a-form-model-item label="公告标题" prop="title">
-          <a-input
-            id="noticeEdit-title"
-            :maxLength="30"
-            v-model="form.title"
-            placeholder="请输入公告标题(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="发布时间" prop="releaseDate">
-          <a-date-picker
-            show-time
-            id="noticeEdit-releaseDate"
-            format="YYYY-MM-DD HH:mm:ss"
-            placeholder="年/月/日 时/分/秒"
-            :disabled-date="disabledDate"
-            :disabledTime="disabledDateTime"
-            v-model="form.releaseDate"/>
-        </a-form-model-item>
-        <a-form-model-item label="图片上传" prop="imgPaths">
-          <Upload
-            class="upload"
-            id="noticeEdit-imgPaths"
-            v-model="form.imgPaths"
-            ref="imgPaths"
-            :fileSize="10"
-            :maxNums="5"
-            @change="changeImage"
-            listType="picture-card"></Upload>
-          <span class="upload-desc">说明:单张大小小于10Mb,最多5张。</span>
-        </a-form-model-item>
-        <a-form-model-item label="附件上传" prop="attachList">
-          <Upload
-            id="noticeEdit-attachList"
-            v-model="form.attachList"
-            ref="attachList"
-            :fileSize="10"
-            :maxNums="3"
-            fileType="*"
-            uploadType="attach"
-            :action="attachAction"
-            @change="changeAttach"></Upload>
-          <span class="upload-desc">说明:单个文件小于10Mb,最多3个附件。</span>
-        </a-form-model-item>
-        <a-form-model-item label="公告内容" prop="content">
-          <editor id="noticeEdit-editor" ref="editor" class="noticeEdit-editor" @on-change="editorChange" :cache="false"></editor>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
-      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="noticeEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="类别" prop="type">
+            <v-select code="NOTITY_BIZ_TYPE" id="noticeEdit-type" v-model="form.type" allowClear placeholder="请选择类别"></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="可见性" prop="toAppName">
+            <v-select code="NOTITY_APP_TYPE" id="noticeEdit-toAppName" v-model="form.toAppName" allowClear placeholder="请选择可见性"></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="公告标题" prop="title">
+            <a-input
+              id="noticeEdit-title"
+              :maxLength="30"
+              v-model="form.title"
+              placeholder="请输入公告标题(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="发布时间" prop="releaseDate">
+            <a-date-picker
+              show-time
+              id="noticeEdit-releaseDate"
+              format="YYYY-MM-DD HH:mm:ss"
+              placeholder="年/月/日 时/分/秒"
+              :disabled-date="disabledDate"
+              :disabledTime="disabledDateTime"
+              v-model="form.releaseDate"/>
+          </a-form-model-item>
+          <a-form-model-item label="图片上传" prop="imgPaths">
+            <Upload
+              class="upload"
+              id="noticeEdit-imgPaths"
+              v-model="form.imgPaths"
+              ref="imgPaths"
+              :fileSize="10"
+              :maxNums="5"
+              @change="changeImage"
+              listType="picture-card"></Upload>
+            <span class="upload-desc">说明:单张大小小于10Mb,最多5张。</span>
+          </a-form-model-item>
+          <a-form-model-item label="附件上传" prop="attachList">
+            <Upload
+              id="noticeEdit-attachList"
+              v-model="form.attachList"
+              ref="attachList"
+              :fileSize="10"
+              :maxNums="3"
+              fileType="*"
+              uploadType="attach"
+              :action="attachAction"
+              @change="changeAttach"></Upload>
+            <span class="upload-desc">说明:单个文件小于10Mb,最多3个附件。</span>
+          </a-form-model-item>
+          <a-form-model-item label="公告内容" prop="content">
+            <editor id="noticeEdit-editor" ref="editor" class="noticeEdit-editor" @on-change="editorChange" :cache="false"></editor>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -109,6 +111,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 20 }
@@ -221,11 +224,15 @@ export default {
           formData.releaseDate = moment(formData.releaseDate).format('YYYY-MM-DD HH:mm:ss')
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.attachList = this.attachList
+          _this.spinning = true
           noticeSave(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.isShow = false
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
           })
         } else {

+ 38 - 31
src/views/supplierManagement/associatedProduct/settingCost.vue

@@ -9,37 +9,39 @@
     @cancle="cansel"
     :width="600">
     <div>
-      <a-form-model
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="labelCol"
-        :wrapper-col="wrapperCol"
-      >
-        <a-form-model-item label="产品名称">
-          {{ productName }}
-        </a-form-model-item>
-        <a-form-model-item label="产品编码">
-          {{ productCode }}
-        </a-form-model-item>
-        <a-form-model-item label="成本价" prop="cost">
-          <a-input-number
-            id="setting-cost"
-            v-model="form.cost"
-            :precision="2"
-            :min="0"
-            :max="999999"
-            placeholder="请输入"
-            style="width: 100%;" />
-        </a-form-model-item>
-        <div style="display: flex;justify-content: center;padding: 30px 0;">
-          <a-button type="primary" @click="onSubmit">
-            确定
-          </a-button>
-          <a-button style="margin-left: 15px;" @click="cansel">
-            取消
-          </a-button>
-        </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="labelCol"
+          :wrapper-col="wrapperCol"
+        >
+          <a-form-model-item label="产品名称">
+            {{ productName }}
+          </a-form-model-item>
+          <a-form-model-item label="产品编码">
+            {{ productCode }}
+          </a-form-model-item>
+          <a-form-model-item label="成本价" prop="cost">
+            <a-input-number
+              id="setting-cost"
+              v-model="form.cost"
+              :precision="2"
+              :min="0"
+              :max="999999"
+              placeholder="请输入"
+              style="width: 100%;" />
+          </a-form-model-item>
+          <div style="display: flex;justify-content: center;padding: 30px 0;">
+            <a-button type="primary" @click="onSubmit">
+              确定
+            </a-button>
+            <a-button style="margin-left: 15px;" @click="cansel">
+              取消
+            </a-button>
+          </div>
+        </a-form-model></a-spin>
       </a-form-model>
     </div>
   </a-modal>
@@ -60,6 +62,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
+      spinning: false,
       title: '设置成本价',
       labelCol: { span: 4 },
       wrapperCol: { span: 18 },
@@ -90,11 +93,15 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = JSON.parse(JSON.stringify(_this.form))
+          _this.spinning = true
           settingCost(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.cansel()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 252 - 244
src/views/supplierManagement/supplierInfo/edit.vue

@@ -6,246 +6,248 @@
         <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
     </a-page-header>
-    <a-form-model
-      id="supplierInfoEdit-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol">
-      <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="supplierInfoEdit-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="基础信息">
-            <a-row>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="供应商名称" prop="supplierName">
-                  <a-input
-                    id="supplierInfoEdit-supplierName"
-                    :maxLength="30"
-                    v-model="form.supplierName"
-                    placeholder="请输入供应商名称(最多30个字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系人1" prop="contact">
-                  <a-input v-model.trim="form.contact" id="supplierInfoEdit-contact" :maxLength="30" allowClear placeholder="请输入联系人1(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系手机1" prop="contactMobile">
-                  <a-input v-model.trim="form.contactMobile" id="supplierInfoEdit-contactMobile" :maxLength="11" allowClear placeholder="请输入联系手机1(最多11个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系角色1" prop="contactRole">
-                  <a-input v-model.trim="form.contactRole" id="supplierInfoEdit-contactRole" :maxLength="30" allowClear placeholder="请输入联系角色1(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系电话" prop="supplierTelephone">
-                  <a-input v-model.trim="form.supplierTelephone" id="supplierInfoEdit-supplierTelephone" :maxLength="13" allowClear placeholder="请输入联系电话" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                <a-form-model-item label="地址" required style="margin: 0;" :label-col="{span:4}" :wrapper-col="{span:20}">
-                  <a-row :gutter="20">
-                    <!-- 地址 -->
-                    <a-col span="8">
-                      <a-form-model-item prop="provinceSn">
-                        <a-select id="supplierInfoEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="8">
-                      <a-form-model-item prop="citySn">
-                        <a-select id="supplierInfoEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="8">
-                      <a-form-model-item prop="districtSn">
-                        <a-select id="supplierInfoEdit-districtSn" @change="areaCharged" v-model="form.districtSn" placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="详细地址" prop="address">
-                  <a-input
-                    id="supplierInfoEdit-address"
-                    :maxLength="60"
-                    v-model="form.address"
-                    placeholder="请输入详细地址(最多60个字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="生产周期(天)" prop="produceCycle">
-                  <a-input-number
-                    id="supplierInfoEdit-produceCycle"
-                    v-model="form.produceCycle"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="配送周期(天)" prop="deliveryCycle">
-                  <a-input-number
-                    id="supplierInfoEdit-deliveryCycle"
-                    v-model="form.deliveryCycle"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="贷款结算周期(天)" prop="settleCycle">
-                  <a-input-number
-                    id="supplierInfoEdit-settleCycle"
-                    v-model="form.settleCycle"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="是否合作" prop="cooperateFlag">
-                  <a-radio-group
-                    name="radioGroup"
-                    v-model="form.cooperateFlag"
-                    id="supplierInfoEdit-cooperateFlag" >
-                    <a-radio :value="1">是</a-radio>
-                    <a-radio :value="0">否</a-radio>
-                  </a-radio-group>
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-      <!-- 扩展信息 -->
-      <a-card size="small" :bordered="false" class="supplierInfoEdit-cont">
-        <a-collapse>
-          <a-collapse-panel key="1" header="扩展信息">
-            <a-row>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经营方式" prop="busniessMode" help="(例:国有企业)">
-                  <a-input
-                    v-model.trim="form.busniessMode"
-                    id="supplierInfoEdit-busniessMode"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入经营方式(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="公司规模" prop="busniessScope" help="(例:100-999人)">
-                  <a-input-number
-                    id="supplierInfoEdit-busniessScope"
-                    v-model="form.busniessScope"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="成立时间" prop="buildDate">
-                  <a-date-picker
-                    style="width:100%"
-                    id="supplierInfoEdit-buildDate"
-                    format="YYYY-MM-DD"
-                    placeholder="请选择日期"
-                    :disabledDate="disabledDate"
-                    v-model="form.buildDate"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="银行账户" prop="tradeAccountName" help="(例:张三)">
-                  <a-input
-                    v-model.trim="form.tradeAccountName"
-                    id="supplierInfoEdit-tradeAccountName"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入银行账户(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="开户行" prop="tradeBankName" help="(例:交通银行)">
-                  <a-input
-                    v-model.trim="form.tradeBankName"
-                    id="supplierInfoEdit-tradeBankName"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入开户行(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="银行账号" prop="tradeBankAccount" help="(例:1123 5677 1112 22342 1123)">
-                  <a-input
-                    v-model.trim="form.tradeBankAccount"
-                    id="supplierInfoEdit-tradeBankAccount"
-                    :maxLength="30"
-                    allowClear
-                    placeholder="请输入银行账号(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系人2" prop="contact2">
-                  <a-input v-model.trim="form.contact2" id="supplierInfoEdit-contact2" :maxLength="30" allowClear placeholder="请输入联系人2(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系手机2" prop="contactMobile2">
-                  <a-input v-model.trim="form.contactMobile2" id="supplierInfoEdit-contactMobile2" :maxLength="11" allowClear placeholder="请输入联系手机2(最多11个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系角色2" prop="contactRole2">
-                  <a-input v-model.trim="form.contactRole2" id="supplierInfoEdit-contactRole2" :maxLength="30" allowClear placeholder="请输入联系角色2(最多30个字符)" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                <a-form-model-item label="备注" prop="remark" :label-col="{span:4}" :wrapper-col="{span:20}">
-                  <a-textarea
-                    id="merchantInfoManagementEdit-remark"
-                    :maxLength="300"
-                    v-model="form.remark"
-                    placeholder="请输入备注(最多300字符)"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-    </a-form-model>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          class="button-primary"
-          id="supplierInfoEdit-submit-btn"
-          size="large"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="supplierInfoEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <!-- 基础信息 -->
+        <a-card size="small" :bordered="false" class="supplierInfoEdit-cont">
+          <a-collapse :activeKey="['1']">
+            <a-collapse-panel key="1" header="基础信息">
+              <a-row>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="供应商名称" prop="supplierName">
+                    <a-input
+                      id="supplierInfoEdit-supplierName"
+                      :maxLength="30"
+                      v-model="form.supplierName"
+                      placeholder="请输入供应商名称(最多30个字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系人1" prop="contact">
+                    <a-input v-model.trim="form.contact" id="supplierInfoEdit-contact" :maxLength="30" allowClear placeholder="请输入联系人1(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系手机1" prop="contactMobile">
+                    <a-input v-model.trim="form.contactMobile" id="supplierInfoEdit-contactMobile" :maxLength="11" allowClear placeholder="请输入联系手机1(最多11个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系角色1" prop="contactRole">
+                    <a-input v-model.trim="form.contactRole" id="supplierInfoEdit-contactRole" :maxLength="30" allowClear placeholder="请输入联系角色1(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系电话" prop="supplierTelephone">
+                    <a-input v-model.trim="form.supplierTelephone" id="supplierInfoEdit-supplierTelephone" :maxLength="13" allowClear placeholder="请输入联系电话" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+                  <a-form-model-item label="地址" required style="margin: 0;" :label-col="{span:4}" :wrapper-col="{span:20}">
+                    <a-row :gutter="20">
+                      <!-- 地址 -->
+                      <a-col span="8">
+                        <a-form-model-item prop="provinceSn">
+                          <a-select id="supplierInfoEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                            <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col span="8">
+                        <a-form-model-item prop="citySn">
+                          <a-select id="supplierInfoEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                            <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col span="8">
+                        <a-form-model-item prop="districtSn">
+                          <a-select id="supplierInfoEdit-districtSn" @change="areaCharged" v-model="form.districtSn" placeholder="请选择区/县">
+                            <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                          </a-select>
+                        </a-form-model-item>
+                      </a-col>
+                    </a-row>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="详细地址" prop="address">
+                    <a-input
+                      id="supplierInfoEdit-address"
+                      :maxLength="60"
+                      v-model="form.address"
+                      placeholder="请输入详细地址(最多60个字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="生产周期(天)" prop="produceCycle">
+                    <a-input-number
+                      id="supplierInfoEdit-produceCycle"
+                      v-model="form.produceCycle"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="配送周期(天)" prop="deliveryCycle">
+                    <a-input-number
+                      id="supplierInfoEdit-deliveryCycle"
+                      v-model="form.deliveryCycle"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="贷款结算周期(天)" prop="settleCycle">
+                    <a-input-number
+                      id="supplierInfoEdit-settleCycle"
+                      v-model="form.settleCycle"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="是否合作" prop="cooperateFlag">
+                    <a-radio-group
+                      name="radioGroup"
+                      v-model="form.cooperateFlag"
+                      id="supplierInfoEdit-cooperateFlag" >
+                      <a-radio :value="1">是</a-radio>
+                      <a-radio :value="0">否</a-radio>
+                    </a-radio-group>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-collapse-panel>
+          </a-collapse>
+        </a-card>
+        <!-- 扩展信息 -->
+        <a-card size="small" :bordered="false" class="supplierInfoEdit-cont">
+          <a-collapse>
+            <a-collapse-panel key="1" header="扩展信息">
+              <a-row>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="经营方式" prop="busniessMode" help="(例:国有企业)">
+                    <a-input
+                      v-model.trim="form.busniessMode"
+                      id="supplierInfoEdit-busniessMode"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入经营方式(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="公司规模" prop="busniessScope" help="(例:100-999人)">
+                    <a-input-number
+                      id="supplierInfoEdit-busniessScope"
+                      v-model="form.busniessScope"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="成立时间" prop="buildDate">
+                    <a-date-picker
+                      style="width:100%"
+                      id="supplierInfoEdit-buildDate"
+                      format="YYYY-MM-DD"
+                      placeholder="请选择日期"
+                      :disabledDate="disabledDate"
+                      v-model="form.buildDate"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="银行账户" prop="tradeAccountName" help="(例:张三)">
+                    <a-input
+                      v-model.trim="form.tradeAccountName"
+                      id="supplierInfoEdit-tradeAccountName"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入银行账户(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="开户行" prop="tradeBankName" help="(例:交通银行)">
+                    <a-input
+                      v-model.trim="form.tradeBankName"
+                      id="supplierInfoEdit-tradeBankName"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入开户行(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="银行账号" prop="tradeBankAccount" help="(例:1123 5677 1112 22342 1123)">
+                    <a-input
+                      v-model.trim="form.tradeBankAccount"
+                      id="supplierInfoEdit-tradeBankAccount"
+                      :maxLength="30"
+                      allowClear
+                      placeholder="请输入银行账号(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系人2" prop="contact2">
+                    <a-input v-model.trim="form.contact2" id="supplierInfoEdit-contact2" :maxLength="30" allowClear placeholder="请输入联系人2(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系手机2" prop="contactMobile2">
+                    <a-input v-model.trim="form.contactMobile2" id="supplierInfoEdit-contactMobile2" :maxLength="11" allowClear placeholder="请输入联系手机2(最多11个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="联系角色2" prop="contactRole2">
+                    <a-input v-model.trim="form.contactRole2" id="supplierInfoEdit-contactRole2" :maxLength="30" allowClear placeholder="请输入联系角色2(最多30个字符)" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+                  <a-form-model-item label="备注" prop="remark" :label-col="{span:4}" :wrapper-col="{span:20}">
+                    <a-textarea
+                      id="merchantInfoManagementEdit-remark"
+                      :maxLength="300"
+                      v-model="form.remark"
+                      placeholder="请输入备注(最多300字符)"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-collapse-panel>
+          </a-collapse>
+        </a-card>
+      </a-form-model>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            class="button-primary"
+            id="supplierInfoEdit-submit-btn"
+            size="large"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
 </template>
 
@@ -258,6 +260,7 @@ export default {
   components: { VSelect },
   data () {
     return {
+      spinning: false,
       formItemLayout: {
         labelCol: {
           span: 8
@@ -351,17 +354,22 @@ export default {
     },
     // 提交
     handleSubmit () {
+      const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          console.log(this.form, 'form data')
-          const form = JSON.parse(JSON.stringify(this.form))
+          console.log(_this.form, 'form data')
+          const form = JSON.parse(JSON.stringify(_this.form))
           if (form.buildDate) {
             form.buildDate = moment(form.buildDate).format('YYYY-MM-DD') + ' 00:00:00'
           }
+          _this.spinning = true
           supplierSave(form).then(res => {
             if (res.status == 200) {
-              this.$message.success(res.message)
-              this.handleBack()
+              _this.$message.success(res.message)
+              _this.handleBack()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {