|
@@ -61,7 +61,23 @@
|
|
{{ detail.endTime }}
|
|
{{ detail.endTime }}
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <template v-if="detail.type === 'LIMIT'">
|
|
|
|
+
|
|
|
|
+ <el-col :span="12" class="item">
|
|
|
|
+ <div class="label">商家最少起提数量</div>
|
|
|
|
+ <div class="value">
|
|
|
|
+ {{ detail.minBuyNum }}
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" class="item">
|
|
|
|
+ <div class="label">商家最大提货组数</div>
|
|
|
|
+ <div class="value">
|
|
|
|
+ {{ detail.maxBuyNum }}
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </template>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+
|
|
<el-row v-if="detail.imgSrc && isShow !== 5" class="img-box">
|
|
<el-row v-if="detail.imgSrc && isShow !== 5" class="img-box">
|
|
<el-col :span="24" class="item">
|
|
<el-col :span="24" class="item">
|
|
<div class="label" style="height: 150px">政策封面图</div>
|
|
<div class="label" style="height: 150px">政策封面图</div>
|
|
@@ -76,9 +92,9 @@
|
|
:preview-src-list="[$imageUrl + item]"
|
|
:preview-src-list="[$imageUrl + item]"
|
|
class="elImageClose"
|
|
class="elImageClose"
|
|
/>
|
|
/>
|
|
- <img v-if="checkFileType(item) == 'word'" class="file" src="@/assets/common/word.png" />
|
|
|
|
- <img v-if="checkFileType(item) == 'excel'" class="file" src="@/assets/common/excel.png" />
|
|
|
|
- <img v-if="checkFileType(item) == 'ppt'" class="file" src="@/assets/common/ppt.png" />
|
|
|
|
|
|
+ <img v-if="checkFileType(item) == 'word'" class="file" src="@/assets/common/word.png">
|
|
|
|
+ <img v-if="checkFileType(item) == 'excel'" class="file" src="@/assets/common/excel.png">
|
|
|
|
+ <img v-if="checkFileType(item) == 'ppt'" class="file" src="@/assets/common/ppt.png">
|
|
|
|
|
|
<img
|
|
<img
|
|
v-if="checkFileType(item) == 'pdf'"
|
|
v-if="checkFileType(item) == 'pdf'"
|
|
@@ -86,9 +102,9 @@
|
|
style="cursor: pointer"
|
|
style="cursor: pointer"
|
|
src="@/assets/common/pdf.png"
|
|
src="@/assets/common/pdf.png"
|
|
@click="openPdf(item)"
|
|
@click="openPdf(item)"
|
|
- />
|
|
|
|
|
|
+ >
|
|
|
|
|
|
- <img v-if="checkFileType(item) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg" />
|
|
|
|
|
|
+ <img v-if="checkFileType(item) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg">
|
|
</template>
|
|
</template>
|
|
<!-- <el-image
|
|
<!-- <el-image
|
|
v-for="item in detail.imgSrc"
|
|
v-for="item in detail.imgSrc"
|
|
@@ -104,7 +120,7 @@
|
|
<el-col :span="24" class="item">
|
|
<el-col :span="24" class="item">
|
|
<div class="label" style="height: 150px">政策封面图</div>
|
|
<div class="label" style="height: 150px">政策封面图</div>
|
|
<div class="value" style="height: 150px">
|
|
<div class="value" style="height: 150px">
|
|
- <ImageUpload :file-list="fileList" :multiple="false" />
|
|
|
|
|
|
+ <image-upload :file-list="fileList" :multiple="false" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -169,9 +185,7 @@
|
|
<el-button size="mini">导入货品价格表</el-button>
|
|
<el-button size="mini">导入货品价格表</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="12" class="tr">
|
|
|
|
-
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <el-col :span="12" class="tr" />
|
|
</el-row>
|
|
</el-row>
|
|
<el-divider />
|
|
<el-divider />
|
|
</el-row>
|
|
</el-row>
|
|
@@ -354,8 +368,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copy-text="scope.row.customerNumber" />
|
|
<CopyButton :copy-text="scope.row.customerNumber" />
|
|
<span>{{ scope.row.customerNumber }}</span>
|
|
<span>{{ scope.row.customerNumber }}</span>
|
|
- </template></el-table-column
|
|
|
|
- >
|
|
|
|
|
|
+ </template></el-table-column>
|
|
<el-table-column prop="customerName" label="经销商名称" align="left">
|
|
<el-table-column prop="customerName" label="经销商名称" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copy-text="scope.row.customerName" />
|
|
<CopyButton :copy-text="scope.row.customerName" />
|
|
@@ -424,13 +437,11 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="4" class="middle_box" :offset="0">
|
|
<el-col :span="4" class="middle_box" :offset="0">
|
|
<el-col>
|
|
<el-col>
|
|
- <el-button size="mini" :disabled="type == 2" @click="handleAllAdd">全部添加</el-button></el-col
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button size="mini" :disabled="type == 2" @click="handleAllAdd">全部添加</el-button></el-col>
|
|
<el-col> <el-button size="mini" :disabled="type == 2" @click="handleAdd">增加</el-button></el-col>
|
|
<el-col> <el-button size="mini" :disabled="type == 2" @click="handleAdd">增加</el-button></el-col>
|
|
<el-col> <el-button size="mini" :disabled="type == 1" @click="handleDelete">删除</el-button></el-col>
|
|
<el-col> <el-button size="mini" :disabled="type == 1" @click="handleDelete">删除</el-button></el-col>
|
|
<el-col>
|
|
<el-col>
|
|
- <el-button size="mini" :disabled="type == 1" @click="handleAllDelete">全部删除</el-button></el-col
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button size="mini" :disabled="type == 1" @click="handleAllDelete">全部删除</el-button></el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="10" :offset="0">
|
|
<el-col :span="10" :offset="0">
|
|
<h5>已选经销商</h5>
|
|
<h5>已选经销商</h5>
|
|
@@ -478,36 +489,8 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
<template>
|
|
<template>
|
|
- <div style="margin: 20px 0">
|
|
|
|
- <!-- <el-upload
|
|
|
|
- class="import-btn"
|
|
|
|
- :action="baseURL + 'student/import'"
|
|
|
|
- :http-request="handleImports"
|
|
|
|
- :file-list="importFileList"
|
|
|
|
- :show-file-list="false"
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" size="mini">导入经销商</el-button>
|
|
|
|
- </el-upload> -->
|
|
|
|
- <!-- <el-button type="primary" size="mini" @click="hanleDownloadFilesPolicy"
|
|
|
|
- >下载模板</el-button
|
|
|
|
- > -->
|
|
|
|
- </div>
|
|
|
|
- <!-- <el-row type="flex" style="margin: 20px 0">
|
|
|
|
- <el-col :xs="24" :sm="12" :lg="14">
|
|
|
|
- <el-input v-model="keyword2" placeholder="查找经销商" size="mini" />
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :xs="24" :sm="1" :lg="1" style="margin-left: 10px"
|
|
|
|
- ><el-button size="mini" @click="submitScreenForm2"
|
|
|
|
- >确定</el-button
|
|
|
|
- ></el-col
|
|
|
|
- >
|
|
|
|
- <el-col :xs="24" :sm="1" :lg="1" style="margin-left: 20px"
|
|
|
|
- ><el-button size="mini" @click="resetScreenForm2"
|
|
|
|
- >重置</el-button
|
|
|
|
- ></el-col
|
|
|
|
- >
|
|
|
|
- </el-row> -->
|
|
|
|
<div style="dispaly: flex">
|
|
<div style="dispaly: flex">
|
|
<h4 style="display: inline-block; margin-right: 20px">经销商上限</h4>
|
|
<h4 style="display: inline-block; margin-right: 20px">经销商上限</h4>
|
|
<ExportButton
|
|
<ExportButton
|
|
@@ -515,9 +498,10 @@
|
|
:ex-url="'policy/limit/export'"
|
|
:ex-url="'policy/limit/export'"
|
|
:ex-params="exParams"
|
|
:ex-params="exParams"
|
|
/>
|
|
/>
|
|
|
|
+ <el-button v-if="list.length" type="primary" size="mini" @click="handelBatchData">批量修改</el-button>
|
|
|
|
+
|
|
<el-divider />
|
|
<el-divider />
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div>
|
|
<div>
|
|
<div class="table">
|
|
<div class="table">
|
|
<el-table
|
|
<el-table
|
|
@@ -531,67 +515,41 @@
|
|
@select-all="handleSelectionAllChange2"
|
|
@select-all="handleSelectionAllChange2"
|
|
@selection-change="handleSelectionChange2"
|
|
@selection-change="handleSelectionChange2"
|
|
>
|
|
>
|
|
- <!-- <el-table-column type="selection" width="55" align="left" /> -->
|
|
|
|
- <el-table-column
|
|
|
|
- prop="customerNumber"
|
|
|
|
- label="经销商编号
|
|
|
|
-"
|
|
|
|
- align="left"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <CopyButton :copy-text="scope.row.customerNumber" />
|
|
|
|
- <span>{{ scope.row.customerNumber }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
<el-table-column prop="customerName" label="经销商名称" align="left">
|
|
<el-table-column prop="customerName" label="经销商名称" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copy-text="scope.row.customerName" />
|
|
<CopyButton :copy-text="scope.row.customerName" />
|
|
<span>{{ scope.row.customerName }}</span>
|
|
<span>{{ scope.row.customerName }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="materialName"
|
|
|
|
- label="物料名称
|
|
|
|
|
|
|
|
-"
|
|
|
|
- align="left"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="maxBuyNum" label="最大配套套数" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <CopyButton :copy-text="scope.row.materialName" />
|
|
|
|
- <span>{{ scope.row.materialName }}</span>
|
|
|
|
|
|
+ {{ scope.row.maxBuyNum }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="materialNumber"
|
|
|
|
- label="物料编号
|
|
|
|
-"
|
|
|
|
- align="left"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="examineOrderNums" label="已审订单数" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <CopyButton :copy-text="scope.row.materialNumber" />
|
|
|
|
- <span>{{ scope.row.materialNumber }}</span>
|
|
|
|
|
|
+ {{ scope.row.examineOrderNums }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="examineOrderNums"
|
|
|
|
- label="已审订单数
|
|
|
|
-"
|
|
|
|
- align="left"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="orderNums" label="已下订单数" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{ scope.row.examineOrderNums | numToFixed }}
|
|
|
|
|
|
+ {{ scope.row.orderNums }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-
|
|
|
|
- <el-table-column
|
|
|
|
- prop="limitQty"
|
|
|
|
- label="购买量上限
|
|
|
|
-
|
|
|
|
-"
|
|
|
|
- align="left"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="materialName" label="物料名称" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{ scope.row.limitQty | numToFixed }}
|
|
|
|
|
|
+ {{ scope.row.materialName }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="materialNumber" label="物料编号" align="left">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ scope.row.materialNumber }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="limitQty" label="订货上限" align="left">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ scope.row.limitQty }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -641,8 +599,56 @@
|
|
<el-button v-if="isShow == 5" type="primary" size="default" @click="handleSave">保存</el-button>
|
|
<el-button v-if="isShow == 5" type="primary" size="default" @click="handleSave">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <operation-records v-if="detail" :policy-id="detail.code" />
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="批量修改"
|
|
|
|
+ :visible.sync="visible"
|
|
|
|
+ width="50%"
|
|
|
|
+ :append-to-body="true"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ @close="handleDialogVisible"
|
|
|
|
+ >
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col :span="24" style="display: flex; align-items: center; margin-bottom: 20px">
|
|
|
|
+ <el-col :span="4" :offset="0"> 最小起起提数 </el-col>
|
|
|
|
+ <el-col :span="8" :offset="0"> <el-input v-model="minBuyNum" size="mini" /></el-col>
|
|
|
|
+ <el-col :span="4" :offset="0"> 最大可提组数 </el-col>
|
|
|
|
+ <el-col :span="8" :offset="0"> <el-input v-model="maxBuyNum" size="mini" /></el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" :offset="0" style="margin-bottom: 20px">
|
|
|
|
+ <div style="display: flex">
|
|
|
|
+ <el-input v-model="buyNumKeyWord" placeholder="输入关键字搜索" size="mini" />
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" size="mini" @click="handelBatchData('search')">查询</el-button>
|
|
|
|
+ <el-button size="mini" @click="onReset">重置</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <zj-table
|
|
|
|
+ :table-attributes="tableAttributes"
|
|
|
|
+ :table-events="tableEvents"
|
|
|
|
+ :is-drop="true"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :table-data="tableData"
|
|
|
|
+ />
|
|
|
|
+ <div style="margin: 20px 0">
|
|
|
|
+ <el-pagination
|
|
|
|
+ :current-page="batchCurrentPages"
|
|
|
|
+ :page-sizes="[10, 20, 30, 50]"
|
|
|
|
+ :page-size="10"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
+ :total="batchTotal"
|
|
|
|
+ @size-change="handleBatchSizeChanges"
|
|
|
|
+ @current-change="handleBatchCurrentChanges"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer">
|
|
|
|
+ <el-button @click="handleDialogVisible">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="onSubmit('limit')">确定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
- <AddCondition v-else :id="cid" @close="handleConditionClose" @back="handleBack" :isEdit="isEdit" :isShow="isShow"/>
|
|
|
|
|
|
+ <add-condition v-else :id="cid" :is-edit="isEdit" :is-show="isShow" @close="handleConditionClose" @back="handleBack" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -657,11 +663,12 @@ import {
|
|
getPolicyDetail,
|
|
getPolicyDetail,
|
|
toExamine,
|
|
toExamine,
|
|
updatePolicy,
|
|
updatePolicy,
|
|
- getPolicyList
|
|
|
|
|
|
+ getPolicyList,
|
|
|
|
+ updateLimitBatchupdate
|
|
} from '@/api/policy_list'
|
|
} from '@/api/policy_list'
|
|
import AddCondition from './AddCondition'
|
|
import AddCondition from './AddCondition'
|
|
import ImageUpload from '@/components/Common/image-upload.vue'
|
|
import ImageUpload from '@/components/Common/image-upload.vue'
|
|
-
|
|
|
|
|
|
+import OperationRecords from './OperationRecords.vue'
|
|
import { handleImport } from '@/utils/util'
|
|
import { handleImport } from '@/utils/util'
|
|
|
|
|
|
import Minxin from '@/mixin'
|
|
import Minxin from '@/mixin'
|
|
@@ -670,10 +677,11 @@ export default {
|
|
name: 'Examine',
|
|
name: 'Examine',
|
|
components: {
|
|
components: {
|
|
AddCondition,
|
|
AddCondition,
|
|
- ImageUpload
|
|
|
|
|
|
+ ImageUpload,
|
|
|
|
+ OperationRecords
|
|
},
|
|
},
|
|
- props: ['id', 'isShow'],
|
|
|
|
mixins: [Minxin],
|
|
mixins: [Minxin],
|
|
|
|
+ props: ['id', 'isShow'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
baseURL: '',
|
|
baseURL: '',
|
|
@@ -742,7 +750,25 @@ export default {
|
|
},
|
|
},
|
|
list: [],
|
|
list: [],
|
|
cTotal: 1,
|
|
cTotal: 1,
|
|
- clistLoading: false
|
|
|
|
|
|
+ clistLoading: false,
|
|
|
|
+ visible: false,
|
|
|
|
+ maxBuyNumVisible: false,
|
|
|
|
+ tableData: [],
|
|
|
|
+ tableAttributes: {
|
|
|
|
+ selectColumn: true
|
|
|
|
+ },
|
|
|
|
+ tableEvents: {
|
|
|
|
+ 'selection-change': this.selectionChange
|
|
|
|
+ },
|
|
|
|
+ limitQty: 0,
|
|
|
|
+ maxBuyNum: 0,
|
|
|
|
+ minBuyNum: 0,
|
|
|
|
+ limitQtyKeyWord: '',
|
|
|
|
+ buyNumKeyWord: '',
|
|
|
|
+ selectedData: [],
|
|
|
|
+ batchCurrentPages: 1,
|
|
|
|
+ batchPageSizes: 10,
|
|
|
|
+ batchTotal: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -750,6 +776,22 @@ export default {
|
|
return {
|
|
return {
|
|
policyId: this.detail.code
|
|
policyId: this.detail.code
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ columns() {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ columnAttributes: {
|
|
|
|
+ label: '经销商编码',
|
|
|
|
+ prop: 'customerNumber'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ columnAttributes: {
|
|
|
|
+ label: '经销商名称',
|
|
|
|
+ prop: 'customerName'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {},
|
|
created() {},
|
|
@@ -761,7 +803,7 @@ export default {
|
|
const title = '详情页'
|
|
const title = '详情页'
|
|
return title
|
|
return title
|
|
},
|
|
},
|
|
- handleBack(){
|
|
|
|
|
|
+ handleBack() {
|
|
this.isEdit = 1
|
|
this.isEdit = 1
|
|
},
|
|
},
|
|
getList() {
|
|
getList() {
|
|
@@ -845,9 +887,9 @@ export default {
|
|
}
|
|
}
|
|
this.dataL = res.data.records
|
|
this.dataL = res.data.records
|
|
for (let k = 0; k < this.dataL.length; k++) {
|
|
for (let k = 0; k < this.dataL.length; k++) {
|
|
- ;(this.dataL[k].customerId = this.dataL[k].id),
|
|
|
|
- (this.dataL[k].customerName = this.dataL[k].name),
|
|
|
|
- (this.dataL[k].customerNumber = this.dataL[k].number)
|
|
|
|
|
|
+ (this.dataL[k].customerId = this.dataL[k].id),
|
|
|
|
+ (this.dataL[k].customerName = this.dataL[k].name),
|
|
|
|
+ (this.dataL[k].customerNumber = this.dataL[k].number)
|
|
}
|
|
}
|
|
|
|
|
|
console.log(this.dataL, '获取经销商列表')
|
|
console.log(this.dataL, '获取经销商列表')
|
|
@@ -994,7 +1036,7 @@ export default {
|
|
* @param {String} index - 索引值
|
|
* @param {String} index - 索引值
|
|
* @return Boolean
|
|
* @return Boolean
|
|
*/
|
|
*/
|
|
- selectable: function (row, index) {
|
|
|
|
|
|
+ selectable: function(row, index) {
|
|
// row.disabled == undefined 才能被选中
|
|
// row.disabled == undefined 才能被选中
|
|
if (row.disabled == undefined || row.disabled == false) {
|
|
if (row.disabled == undefined || row.disabled == false) {
|
|
return true
|
|
return true
|
|
@@ -1119,6 +1161,78 @@ export default {
|
|
this.fileList = []
|
|
this.fileList = []
|
|
this.isShow = 1
|
|
this.isShow = 1
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ selectionChange(data) {
|
|
|
|
+ this.selectedData = data
|
|
|
|
+ },
|
|
|
|
+ handelBatchData(search) {
|
|
|
|
+ if (search) {
|
|
|
|
+ this.batchCurrentPages = 1
|
|
|
|
+ }
|
|
|
|
+ getPolicyList({
|
|
|
|
+ pageNum: this.batchCurrentPages,
|
|
|
|
+ pageSize: this.batchPageSizes,
|
|
|
|
+ policyId: this.id,
|
|
|
|
+ keyword: this.buyNumKeyWord
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.tableData = res.data.records
|
|
|
|
+ this.batchTotal = res.data.total
|
|
|
|
+ })
|
|
|
|
+ this.visible = true
|
|
|
|
+ },
|
|
|
|
+ handelBatchData2() {
|
|
|
|
+ this.maxBuyNumVisible = true
|
|
|
|
+ },
|
|
|
|
+ handleDialogVisible() {
|
|
|
|
+ this.visible = false
|
|
|
|
+ this.maxBuyNumVisible = false
|
|
|
|
+ this.batchCurrentPages = 1
|
|
|
|
+ this.batchPageSizes = 10
|
|
|
|
+ this.limitQty = 0
|
|
|
|
+ this.maxBuyNum = 0
|
|
|
|
+ this.minBuyNum = ''
|
|
|
|
+ this.limitQtyKeyWord = ''
|
|
|
|
+ this.buyNumKeyWord = ''
|
|
|
|
+ },
|
|
|
|
+ onSubmit(type) {
|
|
|
|
+ if (!this.selectedData.length) {
|
|
|
|
+ this.$errorMsg('不能为空,请选择')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.minBuyNum <= 0) {
|
|
|
|
+ this.$errorMsg('最小起起提数不能小于0')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const customerIds = this.selectedData
|
|
|
|
+ .map(k => {
|
|
|
|
+ return k.customerId
|
|
|
|
+ })
|
|
|
|
+ .join('')
|
|
|
|
+ const params = {
|
|
|
|
+ customerIds,
|
|
|
|
+ policyId: this.id,
|
|
|
|
+ minBuyNum: this.minBuyNum,
|
|
|
|
+ maxBuyNum: this.maxBuyNum
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ updateLimitBatchupdate(params).then(res => {
|
|
|
|
+ this.handleDialogVisible()
|
|
|
|
+ this.$successMsg('批量修改成功')
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ handleBatchSizeChanges(val) {
|
|
|
|
+ this.batchCurrentPages = 1
|
|
|
|
+ this.batchPageSizes = val
|
|
|
|
+ this.handelBatchData()
|
|
|
|
+ },
|
|
|
|
+ handleBatchCurrentChanges(val) {
|
|
|
|
+ this.batchCurrentPages = val
|
|
|
|
+ this.handelBatchData()
|
|
|
|
+ },
|
|
|
|
+ onReset() {
|
|
|
|
+ this.handleDialogVisible()
|
|
|
|
+ this.handelBatchData()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|