|
@@ -62,7 +62,6 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<template v-if="detail.type === 'LIMIT'">
|
|
|
-
|
|
|
<el-col :span="12" class="item">
|
|
|
<div class="label">商家最少起提数量</div>
|
|
|
<div class="value">
|
|
@@ -92,9 +91,9 @@
|
|
|
:preview-src-list="[$imageUrl + item]"
|
|
|
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
|
|
|
v-if="checkFileType(item) == 'pdf'"
|
|
@@ -102,9 +101,9 @@
|
|
|
style="cursor: pointer"
|
|
|
src="@/assets/common/pdf.png"
|
|
|
@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>
|
|
|
<!-- <el-image
|
|
|
v-for="item in detail.imgSrc"
|
|
@@ -274,7 +273,6 @@
|
|
|
{{ scope.row.status ? '启用' : '作废' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
@@ -368,7 +366,8 @@
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copy-text="scope.row.customerNumber" />
|
|
|
<span>{{ scope.row.customerNumber }}</span>
|
|
|
- </template></el-table-column>
|
|
|
+ </template></el-table-column
|
|
|
+ >
|
|
|
<el-table-column prop="customerName" label="经销商名称" align="left">
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copy-text="scope.row.customerName" />
|
|
@@ -437,11 +436,13 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="middle_box" :offset="0">
|
|
|
<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 == 1" @click="handleDelete">删除</el-button></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 :span="10" :offset="0">
|
|
|
<h5>已选经销商</h5>
|
|
@@ -498,7 +499,13 @@
|
|
|
:ex-url="'policy/limit/export'"
|
|
|
:ex-params="exParams"
|
|
|
/>
|
|
|
- <el-button v-if=" detail.type !=='PROVISION' &&list.length" type="primary" size="mini" @click="handelBatchData">批量修改</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="detail.type !== 'PROVISION' && list.length"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="handelBatchData"
|
|
|
+ >批量修改</el-button
|
|
|
+ >
|
|
|
|
|
|
<el-divider />
|
|
|
</div>
|
|
@@ -614,6 +621,103 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
+ <div v-if=" detail && detail.type == 'PROVISION'">
|
|
|
+ <div>
|
|
|
+ <h4 style="display: inline-block; margin-right: 20px">经销商配提套数上限</h4>
|
|
|
+ <el-divider />
|
|
|
+ </div>
|
|
|
+ <div style="margin: 20px 0">
|
|
|
+ <!-- <el-upload
|
|
|
+ class="import-btn cus-btn"
|
|
|
+ :action="baseURL + 'policy/limit/group/import'"
|
|
|
+ :http-request="handleImportPolicyLimitGroupPolicy"
|
|
|
+ :file-list="importFileList"
|
|
|
+ :show-file-list="false"
|
|
|
+ >
|
|
|
+ <el-button type="primary" size="mini">导入经销商配提套数</el-button>
|
|
|
+ </el-upload> -->
|
|
|
+ <ExportButton
|
|
|
+ style="display: inline-block; margin-right: 10px"
|
|
|
+ :ex-url="'policy/limit/group/export'"
|
|
|
+ ex-text="导出经销商配提套数"
|
|
|
+ :ex-params="{ policyId: detail.code }"
|
|
|
+ />
|
|
|
+ <!-- <el-button type="primary" size="mini" @click="hanleDownloadFilesPolicyLimitGroupPolicy"
|
|
|
+ >下载模板</el-button
|
|
|
+ > -->
|
|
|
+ </div>
|
|
|
+ <!-- <el-row style="margin: 20px 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="policyKeyWord" placeholder="查找经销商" size="mini" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10" style="margin-left: 20px">
|
|
|
+ <el-button size="mini" @click="getPolicyLimitGroupList">确定</el-button>
|
|
|
+ <el-button size="mini" @click="onPolicyReset">重置</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row> -->
|
|
|
+ <div>
|
|
|
+ <div class="table">
|
|
|
+ <el-table
|
|
|
+ v-loading="policyLoading"
|
|
|
+ :data="policyLimitGroupList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column type="index" width="50" />
|
|
|
+ <el-table-column
|
|
|
+ prop="customerNumber"
|
|
|
+ label="经销商编号
|
|
|
+"
|
|
|
+ align="left"
|
|
|
+ width="300"
|
|
|
+ >
|
|
|
+ <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" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <CopyButton :copy-text="scope.row.customerName" />
|
|
|
+ <span>{{ scope.row.customerName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="groupLimitNum" label="配提上限组数" align="left" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.groupLimitNum }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="orderNums" label="配提上限已下订单数" align="left" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.orderNums }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="examineOrderNums" label="配提上限已审订单数" align="left" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.examineOrderNums }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <!-- 分页 -->
|
|
|
+ <div style="margin: 20px 0">
|
|
|
+ <el-pagination
|
|
|
+ :current-page="policyCurrentPages"
|
|
|
+ :page-sizes="[10, 20, 30, 50]"
|
|
|
+ :page-size="10"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="policyListTotal"
|
|
|
+ @size-change="handlePolicySizeChanges"
|
|
|
+ @current-change="handlePolicyCurrentChanges"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div v-if="isShow == 8 && detail.examineStatus == 'WAIT'" class="descriptions diy-table-1">
|
|
@@ -664,7 +768,9 @@
|
|
|
<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 style="margin-left: 20px" type="primary" size="mini" @click="handelBatchData('search')"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
<el-button size="mini" @click="onReset">重置</el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -694,7 +800,14 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
- <add-condition v-else :id="cid" :is-edit="isEdit" :is-show="isShow" @close="handleConditionClose" @back="handleBack" />
|
|
|
+ <add-condition
|
|
|
+ v-else
|
|
|
+ :id="cid"
|
|
|
+ :is-edit="isEdit"
|
|
|
+ :is-show="isShow"
|
|
|
+ @close="handleConditionClose"
|
|
|
+ @back="handleBack"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -710,12 +823,13 @@ import {
|
|
|
toExamine,
|
|
|
updatePolicy,
|
|
|
getPolicyList,
|
|
|
- updateLimitBatchupdate
|
|
|
+ updateLimitBatchupdate,
|
|
|
+ getPolicyLimitGroupList
|
|
|
} from '@/api/policy_list'
|
|
|
+import { downloadFiles, handleImport } from '@/utils/util'
|
|
|
import AddCondition from './AddCondition'
|
|
|
import ImageUpload from '@/components/Common/image-upload.vue'
|
|
|
import OperationRecords from './OperationRecords.vue'
|
|
|
-import { handleImport } from '@/utils/util'
|
|
|
|
|
|
import Minxin from '@/mixin'
|
|
|
|
|
@@ -814,7 +928,13 @@ export default {
|
|
|
selectedData: [],
|
|
|
batchCurrentPages: 1,
|
|
|
batchPageSizes: 10,
|
|
|
- batchTotal: 0
|
|
|
+ batchTotal: 0,
|
|
|
+ policyLimitGroupList: [],
|
|
|
+ policyLoading: false,
|
|
|
+ policyCurrentPages: 1,
|
|
|
+ policyPageSize: 10,
|
|
|
+ policyListTotal: 0,
|
|
|
+ policyKeyWord: ''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -875,6 +995,7 @@ export default {
|
|
|
this.getConditionList()
|
|
|
this.getCond()
|
|
|
this.getPolicyList()
|
|
|
+ this.getPolicyLimitGroupList()
|
|
|
})
|
|
|
},
|
|
|
getPolicyList() {
|
|
@@ -933,9 +1054,9 @@ export default {
|
|
|
}
|
|
|
this.dataL = res.data.records
|
|
|
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, '获取经销商列表')
|
|
@@ -1082,7 +1203,7 @@ export default {
|
|
|
* @param {String} index - 索引值
|
|
|
* @return Boolean
|
|
|
*/
|
|
|
- selectable: function(row, index) {
|
|
|
+ selectable: function (row, index) {
|
|
|
// row.disabled == undefined 才能被选中
|
|
|
if (row.disabled == undefined || row.disabled == false) {
|
|
|
return true
|
|
@@ -1284,6 +1405,61 @@ export default {
|
|
|
onReset() {
|
|
|
this.handleDialogVisible()
|
|
|
this.handelBatchData()
|
|
|
+ },
|
|
|
+ getPolicyLimitGroupList() {
|
|
|
+ this.policyLoading = true
|
|
|
+ getPolicyLimitGroupList({
|
|
|
+ pageNum: this.policyCurrentPages,
|
|
|
+ pageSize: this.policyPageSize,
|
|
|
+ policyId: this.detail.code,
|
|
|
+ keyword: this.policyKeyWord
|
|
|
+ }).then(res => {
|
|
|
+ this.policyLimitGroupList = res.data.records
|
|
|
+ this.policyListTotal = res.data.total
|
|
|
+ this.policyLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handlePolicySizeChanges(val) {
|
|
|
+ this.policyCurrentPages = 1
|
|
|
+ this.policyPageSize = val
|
|
|
+ this.getPolicyLimitGroupList()
|
|
|
+ },
|
|
|
+ onPolicyReset() {
|
|
|
+ this.policyCurrentPages = 1
|
|
|
+ this.policyPageSize = 10
|
|
|
+ this.policyKeyWord = ''
|
|
|
+ this.getPolicyLimitGroupList()
|
|
|
+ },
|
|
|
+ handlePolicyCurrentChanges(val) {
|
|
|
+ this.policyCurrentPages = val
|
|
|
+ this.getPolicyLimitGroupList()
|
|
|
+ },
|
|
|
+ hanleDownloadFilesPolicyLimitGroupPolicy() {
|
|
|
+ downloadFiles('policy/limit/group/download')
|
|
|
+ },
|
|
|
+ async handleImportPolicyLimitGroupPolicy(param) {
|
|
|
+ this.importLoading = true
|
|
|
+ const file = param.file
|
|
|
+ const formData = new FormData()
|
|
|
+ formData.append('file', file)
|
|
|
+ formData.append('policyId', this.detail.code)
|
|
|
+ // formData.append('type', this.policyType)
|
|
|
+
|
|
|
+ // formData.append("mainId", this.searchForm.mainId);
|
|
|
+ const result = await handleImport('policy/limit/group/import', formData)
|
|
|
+ this.importLoading = false
|
|
|
+ this.importFileList = []
|
|
|
+ if (result.code === 200) {
|
|
|
+ await this.$alert(result.message, '导入成功', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
+ // this.policyLimitGroupList = result.data
|
|
|
+ this.getPolicyLimitGroupList()
|
|
|
+ } else {
|
|
|
+ await this.$alert(result.message, '导入失败', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|