chenrui пре 1 година
родитељ
комит
ce7a3eb75c

+ 7 - 1
src/components/index.less

@@ -11,12 +11,18 @@
     text-overflow:ellipsis;    
     white-space: nowrap;
 }
-.text-overflows{
+.text-overflows3{
     display: -webkit-box;    
     -webkit-box-orient: vertical;    
     -webkit-line-clamp: 3;    
     overflow: hidden;
 }
+.text-overflows2{
+    display: -webkit-box;    
+    -webkit-box-orient: vertical;    
+    -webkit-line-clamp: 2;    
+    overflow: hidden;
+}
 
 
 /* 扩展ant design pro按钮组件颜色 */

+ 26 - 1
src/config/router.config.js

@@ -278,7 +278,7 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'B_salesEdit'
                 }
-              },
+              }
             ]
           },
           {
@@ -3138,6 +3138,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/dealerManagement/promotionManagement',
+            redirect: '/dealerManagement/promotionManagement/list',
+            name: 'dealerPromotionManagement',
+            component: BlankLayout,
+            meta: {
+              title: '经销商促销',
+              icon: 'setting'
+              // permission: 'M_dealerPromotionManagementList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'dealerPromotionManagementList',
+                component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/promotionManagement/list.vue'),
+                meta: {
+                  title: '经销商促销',
+                  icon: 'setting',
+                  hidden: true
+                  // permission: 'M_dealerPromotionManagementList'
+                }
+              }
+            ]
           }
         ]
       },

+ 287 - 0
src/views/dealerManagement/promotionManagement/addModal.vue

@@ -0,0 +1,287 @@
+<template>
+  <a-modal
+    centered
+    class="promotionList-basicInfo-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="itemSn?'编辑':'新增'"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="promotionList-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="促销名称" prop="supplierSn">
+          <a-input id="promotionList-promotionName" v-model.trim="form.promotionName" allowClear placeholder="请输入促销名称(最多30个字符)" :maxLength="30"></a-input>
+        </a-form-model-item>
+        <a-form-model-item label="促销时间" prop="supplierSn">
+          <a-range-picker
+            style="width:100%"
+            id="promotionList-basicInfo-activeDate"
+            :disabledDate="disabledDate"
+            v-model="form.activeDate"
+            :format="dateFormat"
+            :placeholder="['开始时间', '结束时间']"></a-range-picker>
+        </a-form-model-item>
+        <a-form-model-item label="费用所属部门" prop="returnReason">
+          <v-select
+            v-model="form.returnReason"
+            ref="returnReason"
+            id="promotionList-basicInfo-returnReason"
+            code="SPARE_PARTS_RETURN_REASON"
+            placeholder="请选择费用所属部门"
+            allowClear></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="参与客户" prop="supplierSn">
+          <a-row :gutter="15">
+            <a-col :md="5" :sm="24">
+              <a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
+            </a-col>
+            <a-col :md="6" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
+              已{{ chooseDealerList.length }}选项
+            </a-col>
+            <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
+              <div class="buyerBox">
+                <a-tag closable v-for="con in chooseDealerList" :key="con.buyerSn" @close="delBuyerName(con)">
+                  {{ con.buyerName }}
+                </a-tag>
+              </div>
+            </a-col>
+          </a-row>
+        </a-form-model-item>
+        <a-form-model-item label="促销描述" prop="explainInfo">
+          <a-textarea
+            id="promotionList"
+            :maxLength="500"
+            :rows="5"
+            v-model="form.explainInfo"
+            placeholder="请输入促销描述"
+            allowClear />
+        </a-form-model-item>
+        <a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)">
+          <Upload
+            style="height: 100%;"
+            id="allocateBill-attachList"
+            v-model="form.attachmentList"
+            ref="attachList"
+            :fileSize="10"
+            :maxNums="10"
+            fileType="*"
+            uploadType="attach"
+            :action="attachAction"
+            @change="changeAttach"
+            upText="上传附件"></Upload>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button id="promotionList-basicInfo-modal-back" @click="isShow = false">取消</a-button>
+        <a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" @click="handleSave">确定</a-button>
+      </div>
+    </a-spin>
+    <!-- 选择参与客户 -->
+    <a-modal
+      title="选择经销商"
+      :visible="openDealerModal"
+      :footer="null"
+      centered
+      class="lookUpCustomers-modal"
+      @cancel="openDealerModal = false"
+      width="60%"
+    >
+      <div class="dealerModalCon">
+        <chooseDealer ref="dealerChoose" @plAdd="handleAddDealer"></chooseDealer>
+      </div>
+    </a-modal>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, Upload } from '@/components'
+import supplier from '@/views/common/supplier.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
+import moment from 'moment'
+import chooseDealer from '@/views/promotionRulesManagement/promotionManagement/chooseDealer'
+import { sparePartsReturnSave, sparePartsReturnInfo } from '@/api/sparePartsReturn'
+export default {
+  name: 'PromotionListBasicInfoModal',
+  mixins: [commonMixin],
+  components: { VSelect, Upload, supplier, warehouse, chooseDealer },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      formItemLayout: {
+        labelCol: { span: 5 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        promotionName: '',
+        activeDate: undefined,
+        supplierSn: undefined, // 供应商
+        returnReason: '', // 退货原因
+        explainInfo: '', // 补充说明
+        warehouseSn: undefined,
+        attachmentList: ''
+      },
+      openDealerModal: false,
+      chooseDealerList: [],
+      attachList: [], // 附件
+      dateFormat: 'YYYY-MM-DD',
+      rules: {
+        supplierSn: [
+          { required: true, message: '请选择供应商名称', trigger: 'change' }
+        ],
+        returnReason: [
+          { required: true, message: '请选择退货原因', trigger: 'change' }
+        ],
+        warehouseSn: [{ required: true, message: '请选择退货仓库', trigger: 'change' }]
+      },
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo'
+    }
+  },
+  methods: {
+    //  附件上传
+    changeAttach (file) {
+      this.attachList = JSON.parse(file)
+      this.attachList.map(item => {
+        item.fileType = item.extName
+      })
+    },
+    // 选择参与客户
+    handleDealerModal () {
+      this.openDealerModal = true
+      const _this = this
+      if (_this.chooseDealerList.length == 0) {
+        _this.form.promoBuyerList = []
+      }
+      const arr = _this.chooseDealerList.map(item => {
+        return item.buyerSn
+      })
+      // 选择经销商回显
+      _this.$nextTick(() => {
+        _this.$refs.dealerChoose.pageInit(arr)
+      })
+    },
+    // 添加经销商
+    handleAddDealer (list) {
+      this.chooseDealerList = list.map(con => {
+        return {
+          buyerSn: con.dealerSn,
+          buyerName: con.dealerName
+        }
+      })
+      this.openDealerModal = false
+      // 移除表单必填项
+      this.$refs.ruleForm.clearValidate('promoBuyerList')
+    },
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          form.attachmentList = _this.attachList
+          _this.spinning = true
+          sparePartsReturnSave(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 {
+          return false
+        }
+      })
+    },
+    // 获取编辑详情
+    getDetail () {
+      sparePartsReturnInfo({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          const resultObj = res.data
+          this.attachList = resultObj.attachmentList
+          const obj = {
+            supplierSn: resultObj.supplierSn,
+            returnReason: resultObj.returnReason, // 退货原因
+            explainInfo: resultObj.explainInfo, // 补充说明
+            warehouseSn: resultObj.warehouseSn,
+            sparePartsReturnSn: this.itemSn
+          }
+          this.$nextTick(() => {
+            this.$refs.attachList.setFileList(this.attachList)
+          })
+          this.form = { ...this.form, ...obj }
+        } else {
+          this.detailsData = null
+        }
+      })
+    },
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf('day') < moment().subtract(1, 'day') // 今天以后,包含今天
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.attachList = []
+        this.supplierName = null
+        this.$nextTick(() => {
+          this.$refs.attachList.setFileList('')
+          this.$refs.ruleForm.resetFields()
+        })
+      } else {
+        if (this.itemSn) {
+          this.getDetail()
+        } else {
+          // 默认仓库
+          this.form.warehouseSn = this.isShowWarehouse ? undefined : this.defWarehouse && this.defWarehouse.warehouseSn
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .promotionList-basicInfo-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .buyerBox{
+      border:1px solid #d9d9d9;margin-top:10px;border-radius:4px;padding:4px 10px;background:#f2f2f2;max-height:130px;overflow-y:scroll;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+
+</style>

+ 465 - 0
src/views/dealerManagement/promotionManagement/list.vue

@@ -0,0 +1,465 @@
+<template>
+  <a-card size="small" :bordered="false" class="promotionList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="5" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="促销名称">
+                <a-input id="promotionList-promotionName" v-model.trim="queryParam.promotionName" allowClear placeholder="请输入促销名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="发布状态">
+                <v-select
+                  v-model="queryParam.publishStatus"
+                  ref="publishStatus"
+                  id="promotionList-publishStatus"
+                  code="SPARE_PARTS_RETURN_REASON"
+                  placeholder="请选择发布状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="活动状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="promotionList-state"
+                  code="SPARE_PARTS_RETURN_STATE"
+                  placeholder="请选择活动状态"
+                  allowClear
+                ></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="promotionList-reset">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                >导出</a-button>
+                <!-- v-if="$hasPermissions('B_promotionListExport')" -->
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <!-- v-if="$hasPermissions('B_promotionListAdd')" -->
+        <a-button id="promotionList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.sparePartsReturnNo"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 促销名称 -->
+        <template slot="promotionName" slot-scope="text, record">
+          <div class="nameBox text-overflows2">{{ record.promotionName }}名字</div>
+        </template>
+        <!-- 参与客户 -->
+        <template slot="joinCustomers" slot-scope="text, record">
+          <div @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">6</span>个客户</div>
+        </template>
+        <!-- 发布状态 -->
+        <template slot="releaseStatus" slot-scope="text, record">
+          <a-switch
+            id="promotionList-enable"
+            @change="changeStatus(record)"
+            :checked="record.loginFlag == 1 ? true : false"></a-switch>
+        </template>
+        <!-- 操作 -->
+        <!-- state 待提交 WAIT_SUBMIT 待审核 WAIT_AUDIT 未开始 NO_START 进行中 A_FOOT 已完结 FINISH 审核不通过 AUDIT_REJECT -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            @click="handleSetRules(record)"
+            v-if="record.state =='WAIT_SUBMIT'"
+            id="allocateBillList-examine-btn">规则设置</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_SUBMIT' ||record.state == 'AUDIT_REJECT'"
+            @click="handleEdit(record)"
+            class="button-info"
+            id="promotionList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            @click="handleCheck(record)"
+            class="button-info"
+            id="promotionList-edit-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'NO_START' || record.state=='A_FOOT'"
+            @click="handleTime(record)"
+            class="button-info"
+            id="promotionList-edit-btn">促销时间变更</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'NO_START' || record.state=='A_FOOT'"
+            @click="handleEnd(record)"
+            class="button-info"
+            id="promotionList-edit-btn">终止</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_SUBMIT'||record.state == 'AUDIT_REJECT'"
+            @click="handleDel(record)"
+            class="button-error"
+            id="promotionList-del-btn">删除</a-button>
+          <div v-if="record.state == 'FINISH'">--</div>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 参与客户 -->
+    <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
+    <!-- 新增/编辑弹窗-->
+    <add-modal v-drag :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+    <!-- 审核提示语 -->
+
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <!-- 审核进度弹窗 -->
+    <!-- <reviewProgressModal v-drag :itemSn="itemSnSh" :auditTime="auditTime" :openModal="openReviewModal" @close="openReviewModal=false"></reviewProgressModal> -->
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import addModal from './addModal.vue'
+import lookUpCustomersModal from '@/views/promotionRulesManagement/promotionManagement/lookUpCustomersModal'
+// import detailModal from './detailModal.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+// import chooseDepartUserModal from './chooseDepartUserModal.vue'
+// import reviewProgressModal from './reviewProgressModal.vue'
+import reportModal from '@/views/common/reportModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+import supplier from '@/views/common/supplier.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
+import { sparePartsReturnList, sparePartsReturnDelete, sparePartsReturnExportDetail, againSubmit } from '@/api/sparePartsReturn'
+export default {
+  name: 'PromotionManagementList',
+  mixins: [commonMixin],
+  components: { STable, supplier, VSelect, reportModal, rangeDate, warehouse, lookUpCustomersModal, addModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      openModal: false, // 新增弹框是否显示
+      openCustomerModal: false, // 参与客户弹窗
+
+      openDetailModal: false, // 详情弹窗
+      openReviewModal: false, // 审核进度弹窗
+      showExport: false,
+      exportLoading: false,
+      tableHeight: 0,
+      // 查询参数
+      queryParam: {
+        beginDate: undefined,
+        endDate: undefined,
+        sparePartsReturnNo: undefined,
+        supplierSn: undefined,
+        returnReason: undefined,
+        warehouseSn: undefined, // 仓库
+        state: undefined
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销名称', scopedSlots: { customRender: 'promotionName' }, width: '14%', align: 'center' },
+        { title: '促销时间', dataIndex: 'auditDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '9%', align: 'center', ellipsis: true },
+        { title: '促销描述', dataIndex: 'returnReasonDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '活动状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发布状态', scopedSlots: { customRender: 'releaseStatus' }, width: '9%', align: 'center', ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return sparePartsReturnList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      itemSnSh: null,
+      itemSn: null, // 采购退货SN
+      auditTime: null// 审核时间
+    }
+  },
+  methods: {
+    // 创建时间
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      _this.$store.state.app.curActionPermission = 'B_promotionListExport'
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(sparePartsReturnExportDetail, _this.queryParam, '采购退货', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.showExport = true
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    //  新增
+    handleAdd () {
+      this.openModal = true
+    },
+    // 参与客户
+    handleCustomers (row) {
+      this.openCustomerModal = true
+      // this.$nextTick(() => {
+      //   this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.promoBuyerSnSet ? row.promoBuyerSnSet : undefined, promoActiveSn: row.promoActiveSn })
+      // })
+    },
+    //  基本信息  保存
+    handleOk (row) {
+      this.$router.push({ name: 'promotionListAdd', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+    },
+    //  编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'promotionListEdit', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+    },
+    // 发布状态
+    changeStatus (record) {
+      const params = {
+        id: record.id,
+        flag: record.loginFlag == 1 ? '0' : '1'
+      }
+      this.spinning = true
+      dealerUserEnable(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.$refs.table.refresh()
+          this.spinning = false
+        }
+      })
+    },
+    // 规则设置
+    handleSetRules (row) {
+      this.itemSnSh = row.sparePartsReturnSn
+      this.auditTime = row.submitDate
+      const _this = this
+      _this.$nextTick(() => {
+        _this.openReviewModal = true
+      })
+    },
+    // 审核
+    handleCheck (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '请点击下方按钮确认操作?',
+        cancelText: '审核不通过',
+        okText: '审核通过',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          sparePartsReturnDelete({ sn: row.sparePartsReturnSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        },
+        onCancel (e) {
+          console.log('不通过', e)
+        }
+      })
+    },
+    // 促销时间变更
+    handleTime () {},
+    // 终止
+    handleEnd (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要终止该促销?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          sparePartsReturnDelete({ sn: row.sparePartsReturnSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    // 再次提交
+    handleResubmit (row) {
+      const _this = this
+      this.$confirm({
+        title: '操作提示',
+        content: '系统将自动生成一个新的采购退货单,新单据中的产品申退数量将以最大可用库存为准,最大可用库存为0时,系统将强制删除已选的对应产品。您可以对新单据进行编辑、提交等操作,原单据保持不变,确认操作吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          againSubmit({ sparePartsReturnSn: row.sparePartsReturnSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    //  采购退货详情
+    handleDetail (row) {
+      this.itemSn = row.sparePartsReturnSn
+      const _this = this
+      _this.$nextTick(() => {
+        _this.openDetailModal = true
+      })
+    },
+    // 关闭采购退货详情弹框
+    closeDetailModal () {
+      this.itemSn = null
+      this.openDetailModal = false
+    },
+    //  删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除该活动吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          sparePartsReturnDelete({ sn: row.sparePartsReturnSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam = {
+        beginDate: undefined,
+        endDate: undefined,
+        sparePartsReturnNo: undefined,
+        supplierSn: undefined,
+        returnReason: undefined,
+        warehouseSn: undefined, // 仓库
+        state: undefined
+      }
+      this.$refs.rangeDate.resetDate()
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.openModal = false
+      this.openDetailModal = false
+      this.itemSn = null
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 240
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less">
+  .promotionList-wrap{
+    .nameBox{
+     color: #39f;
+     padding:0 5px;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 1 - 1
src/views/promotionRulesManagement/promotionManagement/lookUpCustomersModal.vue

@@ -136,7 +136,7 @@ export default {
       nowType: null,
       printerType: 'NEEDLE', //  打印机类型
       columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '地区', scopedSlots: { customRender: 'address' }, width: '20%', align: 'center', ellipsis: true },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.111/ocs-admin',
+        // target: 'http://192.168.2.111/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {