|
@@ -3,10 +3,9 @@
|
|
|
<div v-if="isEdit == 1">
|
|
|
<el-header height="50px" class="header">
|
|
|
<el-page-header
|
|
|
- @back="($parent.isShow = 1), ($parent.id = '')"
|
|
|
:content="comTitle"
|
|
|
- >
|
|
|
- </el-page-header>
|
|
|
+ @back="($parent.isShow = 1), ($parent.id = '')"
|
|
|
+ />
|
|
|
</el-header>
|
|
|
<div class="app-container">
|
|
|
<div class="diy-table-1">
|
|
@@ -21,7 +20,7 @@
|
|
|
<el-input
|
|
|
v-model="detail.title"
|
|
|
placeholder="请输入政策说明"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
@@ -56,7 +55,7 @@
|
|
|
<el-input
|
|
|
v-model="detail.remark"
|
|
|
placeholder="请输入备注"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
|
|
@@ -74,7 +73,7 @@
|
|
|
default-time="00:00:00"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
/>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">生效日期</div>
|
|
@@ -86,7 +85,7 @@
|
|
|
default-time="00:00:00"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
/> </el-form-item>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="item">
|
|
|
<div class="label">失败日期</div>
|
|
@@ -98,10 +97,10 @@
|
|
|
default-time="00:00:00"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
/> </el-form-item>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row class="img-box" v-if="detail.imgSrc && $parent.isShow !== 5">
|
|
|
+ <el-row v-if="detail.imgSrc && $parent.isShow !== 5" class="img-box">
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label" style="height: 150px">政策封面图</div>
|
|
|
<div class="value" style="height: 150px">
|
|
@@ -110,7 +109,7 @@
|
|
|
:src="$imageUrl + detail.imgSrc"
|
|
|
fit="fill"
|
|
|
:preview-src-list="srcList"
|
|
|
- ></el-image>
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -118,7 +117,7 @@
|
|
|
<el-col :span="24" class="item">
|
|
|
<div class="label" style="height: 150px">政策封面图</div>
|
|
|
<div class="value" style="height: 150px">
|
|
|
- <ImageUpload :fileList="fileList" :multiple="false" />
|
|
|
+ <ImageUpload :file-list="fileList" :multiple="false" />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -127,23 +126,23 @@
|
|
|
<div class="label">审核人</div>
|
|
|
<div class="value">{{ detail.examineBy }}</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" class="item">
|
|
|
+ <el-col :span="16" class="item">
|
|
|
<div class="label">审核日期</div>
|
|
|
<div class="value">{{ detail.examineTime }}</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" class="item">
|
|
|
- <div class="label">关闭人</div>
|
|
|
- <div class="value"></div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8" class="item">
|
|
|
- <div class="label">关闭日期</div>
|
|
|
- <div class="value"></div>
|
|
|
- </el-col>
|
|
|
+ <!-- <el-col :span="8" class="item">-->
|
|
|
+ <!-- <div class="label">关闭人</div>-->
|
|
|
+ <!-- <div class="value"></div>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="24" class="item">-->
|
|
|
+ <!-- <div class="label">关闭日期</div>-->
|
|
|
+ <!-- <div class="value"></div>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="mymain-container">
|
|
|
<el-row>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
<el-row type="flex">
|
|
|
<el-col :span="12">
|
|
|
<h4 style="display: inline-block; margin-right: 20px">
|
|
@@ -166,7 +165,7 @@
|
|
|
> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
</el-row>
|
|
|
<el-table
|
|
|
v-loading="listLoading"
|
|
@@ -183,49 +182,41 @@
|
|
|
label="序号"
|
|
|
width="50"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="materialNumber"
|
|
|
label="货品编码"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="materialName"
|
|
|
label="货品名称"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="specification"
|
|
|
label="规格型号"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="saleTypeCode"
|
|
|
label="销售类型编码"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="saleTypeName"
|
|
|
label="销售类型"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="price" label="单价" align="center">
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
+ <el-table-column prop="price" label="单价" align="center" />
|
|
|
<el-table-column label="支付钱包" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
|
+ v-for="item in scope.row.walletRelaList"
|
|
|
style="margin: 5px"
|
|
|
type="success"
|
|
|
size="small"
|
|
|
- v-for="item in scope.row.walletRelaList"
|
|
|
- >{{ item.walletName }}</el-tag
|
|
|
- >
|
|
|
+ >{{ item.walletName }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column
|
|
@@ -256,18 +247,17 @@
|
|
|
<!-- 分页 -->
|
|
|
<div style="margin: 20px 0">
|
|
|
<el-pagination
|
|
|
- @size-change="handleSizeChange2"
|
|
|
- @current-change="handleCurrentChange2"
|
|
|
:current-page="dcurrentPage"
|
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
|
:page-size="10"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="dlistTotal"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
+ @size-change="handleSizeChange2"
|
|
|
+ @current-change="handleCurrentChange2"
|
|
|
+ />
|
|
|
</div>
|
|
|
<el-row>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
<el-row type="flex">
|
|
|
<el-col :span="12">
|
|
|
<h4 style="display: inline-block; margin-right: 20px">
|
|
@@ -275,7 +265,7 @@
|
|
|
</h4>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
</el-row>
|
|
|
<el-table
|
|
|
:data="conditionList"
|
|
@@ -291,8 +281,7 @@
|
|
|
label="序号"
|
|
|
width="50"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column prop="name" label="限定条件" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.name }}
|
|
@@ -305,8 +294,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="getCommonApi(scope.row)"
|
|
|
- >编辑</el-button
|
|
|
- >
|
|
|
+ >编辑</el-button>
|
|
|
<el-popconfirm
|
|
|
confirm-button-text="好的"
|
|
|
cancel-button-text="不用了"
|
|
@@ -319,8 +307,7 @@
|
|
|
slot="reference"
|
|
|
type="text"
|
|
|
class="textColor el-popover-left"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
<el-button
|
|
@@ -330,13 +317,12 @@
|
|
|
@click="
|
|
|
($parent.isShow = 10), ($parent.policyId = scope.row.id)
|
|
|
"
|
|
|
- >查看条件</el-button
|
|
|
- >
|
|
|
+ >查看条件</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-row>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
<el-row type="flex">
|
|
|
<el-col :span="12">
|
|
|
<h4 style="display: inline-block; margin-right: 20px">
|
|
@@ -344,7 +330,7 @@
|
|
|
</h4>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
</el-row>
|
|
|
<template v-if="$parent.isShow != 5">
|
|
|
<el-table
|
|
@@ -362,33 +348,29 @@
|
|
|
label="序号"
|
|
|
width="50"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="customerNumber"
|
|
|
label="经销商编码"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="customerName"
|
|
|
label="经销商名称"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
<div style="margin: 20px 0">
|
|
|
<el-pagination
|
|
|
- @size-change="handleSizeChanges"
|
|
|
- @current-change="handleCurrentChanges"
|
|
|
:current-page="currentPages"
|
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
|
:page-size="10"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="clistTotals"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
+ @size-change="handleSizeChanges"
|
|
|
+ @current-change="handleCurrentChanges"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
@@ -398,13 +380,13 @@
|
|
|
<el-divider
|
|
|
direction="horizontal"
|
|
|
content-position="left"
|
|
|
- ></el-divider>
|
|
|
+ />
|
|
|
|
|
|
<el-table
|
|
|
+ ref="multipleTable"
|
|
|
:data="dataL"
|
|
|
element-loading-text="Loading"
|
|
|
border
|
|
|
- ref="multipleTable"
|
|
|
height="480px"
|
|
|
fit
|
|
|
highlight-current-row
|
|
@@ -416,75 +398,63 @@
|
|
|
width="55"
|
|
|
:selectable="selectable"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="number"
|
|
|
label="经销商编码"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="name"
|
|
|
label="经销商名称"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
<div style="margin: 20px 0">
|
|
|
<el-pagination
|
|
|
- @size-change="handleSizeChanges"
|
|
|
- @current-change="handleCurrentChanges"
|
|
|
:current-page="currentPages"
|
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
|
:page-size="10"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="clistTotal"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
+ @size-change="handleSizeChanges"
|
|
|
+ @current-change="handleCurrentChanges"
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="middle_box" :offset="0">
|
|
|
<el-col>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
- @click="handleAllAdd"
|
|
|
:disabled="type == 2"
|
|
|
- >全部添加</el-button
|
|
|
- ></el-col
|
|
|
- >
|
|
|
+ @click="handleAllAdd"
|
|
|
+ >全部添加</el-button></el-col>
|
|
|
<el-col>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
- @click="handleAdd"
|
|
|
:disabled="type == 2"
|
|
|
- >增加</el-button
|
|
|
- ></el-col
|
|
|
- >
|
|
|
+ @click="handleAdd"
|
|
|
+ >增加</el-button></el-col>
|
|
|
<el-col>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
:disabled="type == 1"
|
|
|
@click="handleDelete"
|
|
|
- >删除</el-button
|
|
|
- ></el-col
|
|
|
- >
|
|
|
+ >删除</el-button></el-col>
|
|
|
<el-col>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
:disabled="type == 1"
|
|
|
@click="handleAllDelete"
|
|
|
- >全部删除</el-button
|
|
|
- ></el-col
|
|
|
- >
|
|
|
+ >全部删除</el-button></el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="10" :offset="0">
|
|
|
<h5>已选经销商</h5>
|
|
|
<el-divider
|
|
|
direction="horizontal"
|
|
|
content-position="left"
|
|
|
- ></el-divider>
|
|
|
+ />
|
|
|
|
|
|
<el-table
|
|
|
v-loading="listLoading"
|
|
@@ -498,20 +468,17 @@
|
|
|
@select-all="handleSelectionAllChange2"
|
|
|
@selection-change="handleSelectionChange2"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column
|
|
|
prop="customerNumber"
|
|
|
label="经销商编码"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="customerName"
|
|
|
label="经销商名称"
|
|
|
align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
+ />
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
<!-- <div style="margin: 20px 0">
|
|
@@ -530,8 +497,8 @@
|
|
|
</el-row>
|
|
|
</template>
|
|
|
<div
|
|
|
- class="descriptions"
|
|
|
v-if="$parent.isShow == 8 && detail.examineStatus == 'WAIT'"
|
|
|
+ class="descriptions"
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="6">审核人</el-col>
|
|
@@ -550,32 +517,32 @@
|
|
|
<el-col :span="4">审批说明</el-col>
|
|
|
<el-col :span="20" class="col value" style="padding: 0">
|
|
|
<el-input
|
|
|
+ v-model="remark"
|
|
|
size="small"
|
|
|
placeholder="请输入内容"
|
|
|
- v-model="remark"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-button type="primary" size="small" @click="handleSubmit"
|
|
|
- >审核通过</el-button
|
|
|
- >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="handleSubmit"
|
|
|
+ >审核通过</el-button>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-button
|
|
|
- type="primary"
|
|
|
v-if="$parent.isShow == 5"
|
|
|
+ type="primary"
|
|
|
size="default"
|
|
|
@click="handleSave"
|
|
|
- >保存</el-button
|
|
|
- >
|
|
|
+ >保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <EditCondition v-else :id="cid" :policyId="cpolicyId" />
|
|
|
+ <EditCondition v-else :id="cid" :policy-id="cpolicyId" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -599,52 +566,52 @@ import { handleImport } from '@/utils/util'
|
|
|
import Minxin from '@/mixin'
|
|
|
|
|
|
export default {
|
|
|
- mixins: [Minxin],
|
|
|
- name: "examine",
|
|
|
+ name: 'Examine',
|
|
|
components: {
|
|
|
EditCondition,
|
|
|
- ImageUpload,
|
|
|
+ ImageUpload
|
|
|
},
|
|
|
+ mixins: [Minxin],
|
|
|
data() {
|
|
|
return {
|
|
|
- baseURL: "",
|
|
|
+ baseURL: '',
|
|
|
dcurrentPage: 1,
|
|
|
dpageSize: 10,
|
|
|
dlistTotal: 0,
|
|
|
currentPages: 1, // 当前页码
|
|
|
pageSizes: 10, // 每页数量
|
|
|
clistTotal: 0,
|
|
|
- input: "",
|
|
|
- remark: "",
|
|
|
+ input: '',
|
|
|
+ remark: '',
|
|
|
fileList: [],
|
|
|
listLoading: false,
|
|
|
- imageUrl: "",
|
|
|
+ imageUrl: '',
|
|
|
dataList: [],
|
|
|
- examineStatus: "OK",
|
|
|
+ examineStatus: 'OK',
|
|
|
options: {},
|
|
|
- value: "",
|
|
|
+ value: '',
|
|
|
detail: {},
|
|
|
srcList: [],
|
|
|
screenForm: {
|
|
|
- code: "",
|
|
|
- createBy: "",
|
|
|
- endCreateTime: "",
|
|
|
- endTime1: "",
|
|
|
- endTime2: "",
|
|
|
- examineBy: "",
|
|
|
- remark: "",
|
|
|
- startCreateTime: "",
|
|
|
- startTime1: "",
|
|
|
- startTime2: "",
|
|
|
- status: "",
|
|
|
- title: "",
|
|
|
- type: "",
|
|
|
+ code: '',
|
|
|
+ createBy: '',
|
|
|
+ endCreateTime: '',
|
|
|
+ endTime1: '',
|
|
|
+ endTime2: '',
|
|
|
+ examineBy: '',
|
|
|
+ remark: '',
|
|
|
+ startCreateTime: '',
|
|
|
+ startTime1: '',
|
|
|
+ startTime2: '',
|
|
|
+ status: '',
|
|
|
+ title: '',
|
|
|
+ type: ''
|
|
|
},
|
|
|
conditionList: [],
|
|
|
custoList: [],
|
|
|
isEdit: 1,
|
|
|
- cid: "",
|
|
|
- cpolicyId: "",
|
|
|
+ cid: '',
|
|
|
+ cpolicyId: '',
|
|
|
dataL: [],
|
|
|
clistTotal: 0,
|
|
|
clistTotals: 0,
|
|
@@ -662,128 +629,125 @@ export default {
|
|
|
value: 'LIMIT',
|
|
|
label: '限量'
|
|
|
}
|
|
|
- ],
|
|
|
- };
|
|
|
+ ]
|
|
|
+ }
|
|
|
},
|
|
|
- created() {},
|
|
|
computed: {
|
|
|
comTitle() {
|
|
|
- let title = "详情页";
|
|
|
+ let title = '详情页'
|
|
|
if (this.$parent.isShow == 5) {
|
|
|
- title = "编辑页";
|
|
|
+ title = '编辑页'
|
|
|
} else if (this.$parent.isShow == 8) {
|
|
|
- title = "审核页";
|
|
|
+ title = '审核页'
|
|
|
} else {
|
|
|
- title = "详情页";
|
|
|
+ title = '详情页'
|
|
|
}
|
|
|
- return title;
|
|
|
- },
|
|
|
+ return title
|
|
|
+ }
|
|
|
},
|
|
|
+ created() {},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
- this.listLoading = true;
|
|
|
+ this.listLoading = true
|
|
|
getPolicyDetail({ policyId: this.$parent.id }).then((res) => {
|
|
|
- this.detail = res.data;
|
|
|
- this.srcList = [this.$imageUrl + this.detail.imgSrc];
|
|
|
+ this.detail = res.data
|
|
|
+ this.srcList = [this.$imageUrl + this.detail.imgSrc]
|
|
|
if (this.$parent.isShow == 5 && this.detail.imgSrc) {
|
|
|
this.fileList = [
|
|
|
{
|
|
|
- hover: "",
|
|
|
- url: this.detail.imgSrc,
|
|
|
- },
|
|
|
- ];
|
|
|
+ hover: '',
|
|
|
+ url: this.detail.imgSrc
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
- this.handletwoList();
|
|
|
+ this.handletwoList()
|
|
|
// 获取条件政策
|
|
|
- this.getConditionList();
|
|
|
- this.getCond();
|
|
|
- });
|
|
|
+ this.getConditionList()
|
|
|
+ this.getCond()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
getCrList() {
|
|
|
const customerParams = {
|
|
|
pageNum: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
- keyword: this.region == 1 || this.region == "" ? "" : this.keyword,
|
|
|
- region: this.region == 1 ? this.keyword : "",
|
|
|
- };
|
|
|
+ keyword: this.region == 1 || this.region == '' ? '' : this.keyword,
|
|
|
+ region: this.region == 1 ? this.keyword : ''
|
|
|
+ }
|
|
|
// 获取经销商列表
|
|
|
getCrList(customerParams).then((res) => {
|
|
|
for (let j = 0; j < this.custoList.length; j++) {
|
|
|
for (let i = 0; i < res.data.records.length; i++) {
|
|
|
if (res.data.records[i].id == this.custoList[j].customerId) {
|
|
|
- res.data.records[i].disabled = true;
|
|
|
+ res.data.records[i].disabled = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.dataL = res.data.records;
|
|
|
+ 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].customerName = this.dataL[k].name),
|
|
|
+ (this.dataL[k].customerNumber = this.dataL[k].number)
|
|
|
}
|
|
|
|
|
|
- console.log(this.dataL, "获取经销商列表");
|
|
|
- this.clistTotal = res.data.total;
|
|
|
- });
|
|
|
+ console.log(this.dataL, '获取经销商列表')
|
|
|
+ this.clistTotal = res.data.total
|
|
|
+ })
|
|
|
},
|
|
|
// 更改每页数量
|
|
|
handleSizeChanges(val) {
|
|
|
- this.pageSizes = val;
|
|
|
- this.currentPages = 1;
|
|
|
- this.getCond();
|
|
|
+ this.pageSizes = val
|
|
|
+ this.currentPages = 1
|
|
|
+ this.getCond()
|
|
|
},
|
|
|
// 更改当前页
|
|
|
handleCurrentChanges(val) {
|
|
|
- this.currentPages = val;
|
|
|
- this.getCond();
|
|
|
+ this.currentPages = val
|
|
|
+ this.getCond()
|
|
|
},
|
|
|
// 更改每页数量
|
|
|
handleSizeChange2(val) {
|
|
|
-
|
|
|
- this.dpageSize = val;
|
|
|
- this.dcurrentPage = 1;
|
|
|
- this.handletwoList();
|
|
|
+ this.dpageSize = val
|
|
|
+ this.dcurrentPage = 1
|
|
|
+ this.handletwoList()
|
|
|
},
|
|
|
// 更改当前页
|
|
|
handleCurrentChange2(val) {
|
|
|
-
|
|
|
-
|
|
|
- this.dcurrentPage = val;
|
|
|
- this.handletwoList();
|
|
|
+ this.dcurrentPage = val
|
|
|
+ this.handletwoList()
|
|
|
},
|
|
|
getCommonApi(row) {
|
|
|
- (this.isEdit = 2), (this.cid = row.id), (this.cpolicyId = row.policyId);
|
|
|
+ (this.isEdit = 2), (this.cid = row.id), (this.cpolicyId = row.policyId)
|
|
|
console.log(
|
|
|
this.cpolicyId,
|
|
|
this.detail.code,
|
|
|
this.cpolicyId == this.detail.code
|
|
|
- );
|
|
|
+ )
|
|
|
},
|
|
|
getCond() {
|
|
|
- this.listLoading = true;
|
|
|
+ this.listLoading = true
|
|
|
const custoParams = {
|
|
|
pageNum: this.currentPages,
|
|
|
pageSize: this.pageSizes,
|
|
|
- policyId: this.detail.code,
|
|
|
- };
|
|
|
+ policyId: this.detail.code
|
|
|
+ }
|
|
|
getCustomerList(custoParams).then((res) => {
|
|
|
- this.custoList = res.data.records;
|
|
|
- this.clistTotals = res.data.total;
|
|
|
- this.listLoading = false;
|
|
|
- this.getCrList();
|
|
|
- });
|
|
|
+ this.custoList = res.data.records
|
|
|
+ this.clistTotals = res.data.total
|
|
|
+ this.listLoading = false
|
|
|
+ this.getCrList()
|
|
|
+ })
|
|
|
},
|
|
|
handleSubmit() {
|
|
|
toExamine({
|
|
|
examineStatus: this.examineStatus,
|
|
|
policyId: this.$parent.id,
|
|
|
- examineRemark: this.remark,
|
|
|
+ examineRemark: this.remark
|
|
|
}).then((res) => {
|
|
|
- this.$successMsg("已提交审核");
|
|
|
- this.$parent.isShow = 1;
|
|
|
- this.$parent.getList();
|
|
|
- });
|
|
|
+ this.$successMsg('已提交审核')
|
|
|
+ this.$parent.isShow = 1
|
|
|
+ this.$parent.getList()
|
|
|
+ })
|
|
|
},
|
|
|
// 获取货品信息
|
|
|
handletwoList() {
|
|
@@ -792,40 +756,40 @@ export default {
|
|
|
pageNum: this.dcurrentPage,
|
|
|
pageSize: this.dpageSize,
|
|
|
policyId: this.detail.code,
|
|
|
- saleTypeCode: "",
|
|
|
- };
|
|
|
+ saleTypeCode: ''
|
|
|
+ }
|
|
|
getMaterialList(paramss)
|
|
|
.then((result) => {
|
|
|
- this.dataList = result.data.records;
|
|
|
- this.dlistTotal = result.data.total;
|
|
|
- this.listLoading = false;
|
|
|
+ this.dataList = result.data.records
|
|
|
+ this.dlistTotal = result.data.total
|
|
|
+ this.listLoading = false
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
// 导入
|
|
|
async handleImport(param) {
|
|
|
- this.importLoading = true;
|
|
|
- const file = param.file;
|
|
|
- console.log(file, 123);
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file);
|
|
|
- formData.append("policyId", this.detail.code);
|
|
|
+ this.importLoading = true
|
|
|
+ const file = param.file
|
|
|
+ console.log(file, 123)
|
|
|
+ const formData = new FormData()
|
|
|
+ formData.append('file', file)
|
|
|
+ formData.append('policyId', this.detail.code)
|
|
|
// formData.append("mainId", this.detail.mainId);
|
|
|
- let result = await handleImport("/policy/material/import", formData);
|
|
|
- this.importLoading = false;
|
|
|
- this.importFileList = [];
|
|
|
+ const result = await handleImport('/policy/material/import', formData)
|
|
|
+ this.importLoading = false
|
|
|
+ this.importFileList = []
|
|
|
if (result.code == 200) {
|
|
|
- this.$alert(result.message, "导入成功", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- });
|
|
|
+ this.$alert(result.message, '导入成功', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
|
|
|
- this.handletwoList();
|
|
|
+ this.handletwoList()
|
|
|
} else {
|
|
|
- this.$alert(result.message, "导入失败", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- });
|
|
|
+ this.$alert(result.message, '导入失败', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
handleCondition(id, index) {
|
|
@@ -835,25 +799,25 @@ export default {
|
|
|
// this.$children[9].$data,
|
|
|
// this.$children[9].$options.data()
|
|
|
// );
|
|
|
- this.getConditionList();
|
|
|
- this.$successMsg("删除成功");
|
|
|
- });
|
|
|
+ this.getConditionList()
|
|
|
+ this.$successMsg('删除成功')
|
|
|
+ })
|
|
|
},
|
|
|
getConditionList() {
|
|
|
const condParams = {
|
|
|
- policyId: this.detail.code,
|
|
|
- };
|
|
|
+ policyId: this.detail.code
|
|
|
+ }
|
|
|
getConditionList(condParams).then((res) => {
|
|
|
- this.conditionList = res.data;
|
|
|
- });
|
|
|
+ this.conditionList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
- //删除
|
|
|
+ // 删除
|
|
|
hanleDelete(id) {
|
|
|
- const params = { policyMaterialId: id };
|
|
|
+ const params = { policyMaterialId: id }
|
|
|
deleteMaterialPolicy(params).then((res) => {
|
|
|
- this.$successMsg("删除成功");
|
|
|
- this.handletwoList();
|
|
|
- });
|
|
|
+ this.$successMsg('删除成功')
|
|
|
+ this.handletwoList()
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 根据条件禁用行复选框
|
|
@@ -862,52 +826,52 @@ 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;
|
|
|
+ return true
|
|
|
} else {
|
|
|
- return false;
|
|
|
+ return false
|
|
|
}
|
|
|
// 函数必须有返回值且是布尔值
|
|
|
// 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
|
|
|
// 如果没有返回值则默认返回false(全部无法选中)
|
|
|
},
|
|
|
handleSelectionAllChange(e) {
|
|
|
- this.leftData = e;
|
|
|
- this.type = 1;
|
|
|
+ this.leftData = e
|
|
|
+ this.type = 1
|
|
|
},
|
|
|
handleSelectionChange(e) {
|
|
|
- this.leftData = e;
|
|
|
- this.type = 1;
|
|
|
+ this.leftData = e
|
|
|
+ this.type = 1
|
|
|
},
|
|
|
handleSelectionAllChange2(e) {
|
|
|
- this.rightData = e;
|
|
|
- this.type = 2;
|
|
|
+ this.rightData = e
|
|
|
+ this.type = 2
|
|
|
},
|
|
|
handleSelectionChange2(e) {
|
|
|
- this.rightData = e;
|
|
|
- this.type = 2;
|
|
|
+ this.rightData = e
|
|
|
+ this.type = 2
|
|
|
},
|
|
|
handleLeft(e) {
|
|
|
- this.type = 1;
|
|
|
+ this.type = 1
|
|
|
},
|
|
|
handleRight(e) {
|
|
|
- this.type = 2;
|
|
|
+ this.type = 2
|
|
|
},
|
|
|
handleAllAdd() {
|
|
|
if (this.type == 1 && this.leftData.length) {
|
|
|
for (let i = 0; i < this.dataL.length; i++) {
|
|
|
for (let j = 0; j < this.leftData.length; j++) {
|
|
|
if (this.dataL[i].id == this.leftData[j].id) {
|
|
|
- this.dataL[i].disabled = true;
|
|
|
+ this.dataL[i].disabled = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.custoList = [...this.custoList, ...this.leftData];
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
+ this.custoList = [...this.custoList, ...this.leftData]
|
|
|
+ this.$refs.multipleTable.clearSelection()
|
|
|
} else {
|
|
|
- this.$errorMsg("请选择要添加的经销商");
|
|
|
+ this.$errorMsg('请选择要添加的经销商')
|
|
|
}
|
|
|
},
|
|
|
handleAllDelete() {
|
|
@@ -915,14 +879,14 @@ export default {
|
|
|
for (let i = 0; i < this.dataL.length; i++) {
|
|
|
for (let j = 0; j < this.rightData.length; j++) {
|
|
|
if (this.dataL[i].id == this.rightData[j].customerId) {
|
|
|
- this.$set(this.dataL[i], "disabled", false);
|
|
|
+ this.$set(this.dataL[i], 'disabled', false)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- const arr = this.resArr(this.custoList, this.rightData);
|
|
|
- this.custoList = arr;
|
|
|
+ const arr = this.resArr(this.custoList, this.rightData)
|
|
|
+ this.custoList = arr
|
|
|
} else {
|
|
|
- this.$errorMsg("请选择要删除的经销商");
|
|
|
+ this.$errorMsg('请选择要删除的经销商')
|
|
|
}
|
|
|
},
|
|
|
handleAdd() {
|
|
@@ -930,15 +894,15 @@ export default {
|
|
|
for (let i = 0; i < this.dataL.length; i++) {
|
|
|
for (let j = 0; j < this.leftData.length; j++) {
|
|
|
if (this.dataL[i].id == this.leftData[j].id) {
|
|
|
- this.dataL[i].disabled = true;
|
|
|
+ this.dataL[i].disabled = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.custoList = [...this.custoList, ...this.leftData];
|
|
|
- this.leftData = [];
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
+ this.custoList = [...this.custoList, ...this.leftData]
|
|
|
+ this.leftData = []
|
|
|
+ this.$refs.multipleTable.clearSelection()
|
|
|
} else {
|
|
|
- this.$errorMsg("请选择要添加的经销商");
|
|
|
+ this.$errorMsg('请选择要添加的经销商')
|
|
|
}
|
|
|
},
|
|
|
handleDelete() {
|
|
@@ -946,50 +910,50 @@ export default {
|
|
|
for (let i = 0; i < this.dataL.length; i++) {
|
|
|
for (let j = 0; j < this.rightData.length; j++) {
|
|
|
if (this.dataL[i].id == this.rightData[j].customerId) {
|
|
|
- this.$set(this.dataL[i], "disabled", false);
|
|
|
+ this.$set(this.dataL[i], 'disabled', false)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- const arr = this.resArr(this.custoList, this.rightData);
|
|
|
- this.custoList = arr;
|
|
|
+ const arr = this.resArr(this.custoList, this.rightData)
|
|
|
+ this.custoList = arr
|
|
|
} else {
|
|
|
- this.$errorMsg("请选择要删除的经销商");
|
|
|
+ this.$errorMsg('请选择要删除的经销商')
|
|
|
}
|
|
|
},
|
|
|
- //去掉相同数据
|
|
|
+ // 去掉相同数据
|
|
|
resArr(arr1, arr2) {
|
|
|
- return arr1.filter((v) => arr2.every((val) => val.id != v.id));
|
|
|
+ return arr1.filter((v) => arr2.every((val) => val.id != v.id))
|
|
|
},
|
|
|
async handleSave() {
|
|
|
if (this.custoList.length) {
|
|
|
- var arr = [];
|
|
|
+ var arr = []
|
|
|
this.custoList.forEach((el) => {
|
|
|
arr.push({
|
|
|
customerId: el.customerId,
|
|
|
customerName: el.customerName,
|
|
|
customerNumber: el.customerNumber,
|
|
|
- lastOrderTime: "",
|
|
|
+ lastOrderTime: '',
|
|
|
limitTakeNum: 0,
|
|
|
policyId: this.detail.code,
|
|
|
- policyTitle: "",
|
|
|
- remark: "",
|
|
|
- });
|
|
|
- });
|
|
|
+ policyTitle: '',
|
|
|
+ remark: ''
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
const params = {
|
|
|
...this.detail,
|
|
|
policyCustomers: arr,
|
|
|
- imgSrc: this.fileList.length ? this.fileList[0].url : "",
|
|
|
- };
|
|
|
- await updatePolicy(params);
|
|
|
- await this.getCond();
|
|
|
- this.$successMsg("编辑成功");
|
|
|
- this.fileList = [];
|
|
|
- this.$parent.isShow = 1;
|
|
|
+ imgSrc: this.fileList.length ? this.fileList[0].url : ''
|
|
|
+ }
|
|
|
+ await updatePolicy(params)
|
|
|
+ await this.getCond()
|
|
|
+ this.$successMsg('编辑成功')
|
|
|
+ this.fileList = []
|
|
|
+ this.$parent.isShow = 1
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|