|
@@ -7,7 +7,7 @@
|
|
@back="($parent.isShow = 1), ($parent.isFlag = '')"
|
|
@back="($parent.isShow = 1), ($parent.isFlag = '')"
|
|
/>
|
|
/>
|
|
</el-header>
|
|
</el-header>
|
|
- <div >
|
|
|
|
|
|
+ <div>
|
|
<div class="screen-container">
|
|
<div class="screen-container">
|
|
<h4>销售政策信息</h4>
|
|
<h4>销售政策信息</h4>
|
|
<el-divider />
|
|
<el-divider />
|
|
@@ -77,7 +77,8 @@
|
|
placeholder="生效日期"
|
|
placeholder="生效日期"
|
|
default-time="00:00:00"
|
|
default-time="00:00:00"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
- /> </el-form-item></el-col>
|
|
|
|
|
|
+ /> </el-form-item
|
|
|
|
+ ></el-col>
|
|
<el-col :xs="24" :ms="12" :lg="12">
|
|
<el-col :xs="24" :ms="12" :lg="12">
|
|
<el-form-item label="失效日期" prop="endTime">
|
|
<el-form-item label="失效日期" prop="endTime">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -86,7 +87,8 @@
|
|
placeholder="失效日期"
|
|
placeholder="失效日期"
|
|
default-time="00:00:00"
|
|
default-time="00:00:00"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
- /> </el-form-item></el-col>
|
|
|
|
|
|
+ /> </el-form-item
|
|
|
|
+ ></el-col>
|
|
<el-col :xs="24" :ms="24" :lg="24">
|
|
<el-col :xs="24" :ms="24" :lg="24">
|
|
<el-form-item label="销售政策说明" prop="remark">
|
|
<el-form-item label="销售政策说明" prop="remark">
|
|
<el-input
|
|
<el-input
|
|
@@ -119,10 +121,9 @@
|
|
:file-list="importFileList"
|
|
:file-list="importFileList"
|
|
:show-file-list="false"
|
|
:show-file-list="false"
|
|
>
|
|
>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- >导入货品价格表</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="small"
|
|
|
|
+ >导入货品价格表</el-button
|
|
|
|
+ >
|
|
</el-upload>
|
|
</el-upload>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -130,7 +131,13 @@
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
@click="hanleDownloadFiles"
|
|
@click="hanleDownloadFiles"
|
|
- >下载模板</el-button>
|
|
|
|
|
|
+ >下载模板</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ >导出</el-button
|
|
|
|
+ >
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-divider />
|
|
<el-divider />
|
|
@@ -149,25 +156,30 @@
|
|
type="index"
|
|
type="index"
|
|
label="序号"
|
|
label="序号"
|
|
width="50"
|
|
width="50"
|
|
- align="center"
|
|
|
|
|
|
+ align="left"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="materialNumber"
|
|
prop="materialNumber"
|
|
- label="货品编码"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="物料编码"
|
|
|
|
+ align="left"
|
|
|
|
+
|
|
|
|
+ min-width="150"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
+
|
|
|
|
+
|
|
<el-select
|
|
<el-select
|
|
v-model="scope.row.materialNumber"
|
|
v-model="scope.row.materialNumber"
|
|
v-el-select-loadmore="loadmore"
|
|
v-el-select-loadmore="loadmore"
|
|
size="small"
|
|
size="small"
|
|
- :remote-method="(query)=>remoteMethod(query,'number')"
|
|
|
|
|
|
+ :remote-method="(query) => remoteMethod(query, 'number')"
|
|
filterable
|
|
filterable
|
|
remote
|
|
remote
|
|
@change="handleK3List($event, scope.row)"
|
|
@change="handleK3List($event, scope.row)"
|
|
>
|
|
>
|
|
|
|
+ <template #prefix> <CopyButton :copyText="scope.row.materialNumber" /></template>
|
|
<el-option
|
|
<el-option
|
|
- v-for="(item,index) in k3List"
|
|
|
|
|
|
+ v-for="(item, index) in k3List"
|
|
:key="index"
|
|
:key="index"
|
|
:label="item.number"
|
|
:label="item.number"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
@@ -176,37 +188,53 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
prop="materialName"
|
|
prop="materialName"
|
|
- label="货品名称"
|
|
|
|
- align="center"
|
|
|
|
- />
|
|
|
|
|
|
+ label="产品名称"
|
|
|
|
+ align="left"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <CopyButton :copyText="scope.row.materialName" />
|
|
|
|
+ <span>{{scope.row.materialName}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
|
|
+
|
|
|
|
+ min-width="150"
|
|
prop="specification"
|
|
prop="specification"
|
|
label="规格型号"
|
|
label="规格型号"
|
|
- align="center"
|
|
|
|
|
|
+ align="left"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
+
|
|
<el-select
|
|
<el-select
|
|
v-model="scope.row.specification"
|
|
v-model="scope.row.specification"
|
|
size="small"
|
|
size="small"
|
|
- :remote-method="(query)=>remoteMethod(query,'specification')"
|
|
|
|
|
|
+ :remote-method="
|
|
|
|
+ (query) => remoteMethod(query, 'specification')
|
|
|
|
+ "
|
|
filterable
|
|
filterable
|
|
remote
|
|
remote
|
|
@change="handleK3List($event, scope.row)"
|
|
@change="handleK3List($event, scope.row)"
|
|
>
|
|
>
|
|
|
|
+ <template #prefix> <CopyButton :copyText="scope.row.materialNumber" /></template>
|
|
<el-option
|
|
<el-option
|
|
- v-for="(item,index) in k3List"
|
|
|
|
|
|
+ v-for="(item, index) in k3List"
|
|
:key="index"
|
|
:key="index"
|
|
:label="item.specification"
|
|
:label="item.specification"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
prop="saleTypeName"
|
|
prop="saleTypeName"
|
|
label="销售类型"
|
|
label="销售类型"
|
|
- align="center"
|
|
|
|
|
|
+ align="left"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
<el-select
|
|
@@ -225,14 +253,17 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
prop="saleTypeCode"
|
|
prop="saleTypeCode"
|
|
label="销售类型编码"
|
|
label="销售类型编码"
|
|
- align="center"
|
|
|
|
|
|
+ align="left"
|
|
/>
|
|
/>
|
|
|
|
|
|
- <el-table-column prop="discAmount" label="格力折扣" align="center">
|
|
|
|
|
|
+ <el-table-column prop="discAmount" label="格力折扣" align="right">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ class="yinput"
|
|
v-model.number="scope.row.discAmount"
|
|
v-model.number="scope.row.discAmount"
|
|
type="number"
|
|
type="number"
|
|
placeholder="请输入格力折扣"
|
|
placeholder="请输入格力折扣"
|
|
@@ -240,9 +271,16 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="price" label="单价" align="center">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="price"
|
|
|
|
+ label="单价"
|
|
|
|
+ align="right"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ class="yinput"
|
|
v-model.number="scope.row.price"
|
|
v-model.number="scope.row.price"
|
|
type="number"
|
|
type="number"
|
|
placeholder="请输入单价"
|
|
placeholder="请输入单价"
|
|
@@ -250,7 +288,12 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="返利钱包" align="center">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="返利钱包"
|
|
|
|
+ align="left"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
<el-select
|
|
v-model="scope.row.rebateWalletIds"
|
|
v-model="scope.row.rebateWalletIds"
|
|
@@ -267,7 +310,12 @@
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="支付钱包" align="center">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="支付钱包"
|
|
|
|
+ align="left"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
<el-select
|
|
v-model="scope.row.walletIds"
|
|
v-model="scope.row.walletIds"
|
|
@@ -284,7 +332,13 @@
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="remark" label="备注" align="center">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="remark"
|
|
|
|
+ label="备注"
|
|
|
|
+ align="left"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="150"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
<el-input
|
|
v-model="scope.row.remark"
|
|
v-model="scope.row.remark"
|
|
@@ -301,14 +355,14 @@
|
|
icon="el-icon-info"
|
|
icon="el-icon-info"
|
|
icon-color="red"
|
|
icon-color="red"
|
|
title="内容确定删除吗?"
|
|
title="内容确定删除吗?"
|
|
-
|
|
|
|
@onConfirm="hanleDelete(scope.row.id, scope.$index)"
|
|
@onConfirm="hanleDelete(scope.row.id, scope.$index)"
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
slot="reference"
|
|
slot="reference"
|
|
type="text"
|
|
type="text"
|
|
class="textColor el-popover-left"
|
|
class="textColor el-popover-left"
|
|
- >删除</el-button>
|
|
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -322,16 +376,12 @@
|
|
"
|
|
"
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- @click="handleNewInfo"
|
|
|
|
- >添加</el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- @click="handleSave"
|
|
|
|
- >保存</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="handleNewInfo"
|
|
|
|
+ >添加</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button type="primary" size="small" @click="handleSave"
|
|
|
|
+ >保存</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
<!-- <el-pagination-->
|
|
<!-- <el-pagination-->
|
|
<!-- :current-page="dcurrentPage"-->
|
|
<!-- :current-page="dcurrentPage"-->
|
|
@@ -351,11 +401,10 @@
|
|
<h4 style="display: inline-block; margin-right: 20px">
|
|
<h4 style="display: inline-block; margin-right: 20px">
|
|
条件信息
|
|
条件信息
|
|
</h4>
|
|
</h4>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- @click="isCondition = 1"
|
|
|
|
- >添加</el-button></el-col>
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="isCondition = 1"
|
|
|
|
+ >添加</el-button
|
|
|
|
+ ></el-col
|
|
|
|
+ >
|
|
</el-row>
|
|
</el-row>
|
|
<el-divider />
|
|
<el-divider />
|
|
</el-row>
|
|
</el-row>
|
|
@@ -372,9 +421,9 @@
|
|
type="index"
|
|
type="index"
|
|
label="序号"
|
|
label="序号"
|
|
width="50"
|
|
width="50"
|
|
- align="center"
|
|
|
|
|
|
+ align="left"
|
|
/>
|
|
/>
|
|
- <el-table-column prop="name" label="限定条件" align="center">
|
|
|
|
|
|
+ <el-table-column prop="name" label="限定条件" align="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
<el-input
|
|
v-model="scope.row.name"
|
|
v-model="scope.row.name"
|
|
@@ -395,13 +444,18 @@
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
- @click="scope.row.fang = false;conditName=scope.row.name"
|
|
|
|
- >编辑</el-button>
|
|
|
|
|
|
+ @click="
|
|
|
|
+ scope.row.fang = false;
|
|
|
|
+ conditName = scope.row.name;
|
|
|
|
+ "
|
|
|
|
+ >编辑</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
@click="handleCondition(scope.row.id, scope.$index)"
|
|
@click="handleCondition(scope.row.id, scope.$index)"
|
|
- >删除</el-button>
|
|
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -416,7 +470,10 @@
|
|
</el-row>
|
|
</el-row>
|
|
<el-divider />
|
|
<el-divider />
|
|
</el-row>
|
|
</el-row>
|
|
- <TabelTransfer @handlEditPolicy="handleAddPolicy" @handleReset="handleReset" />
|
|
|
|
|
|
+ <TabelTransfer
|
|
|
|
+ @handlEditPolicy="handleAddPolicy"
|
|
|
|
+ @handleReset="handleReset"
|
|
|
|
+ />
|
|
<!-- <Transfer @handleAddPolicy="handleAddPolicy" @handleReset="handleReset" />-->
|
|
<!-- <Transfer @handleAddPolicy="handleAddPolicy" @handleReset="handleReset" />-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -452,13 +509,13 @@ import ImageUpload from '@/components/Common/image-upload.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
directives: {
|
|
directives: {
|
|
- 'el-select-loadmore': {
|
|
|
|
|
|
+ "el-select-loadmore": {
|
|
bind(el, binding) {
|
|
bind(el, binding) {
|
|
// 获取element-ui定义好的scroll盒⼦
|
|
// 获取element-ui定义好的scroll盒⼦
|
|
const SELECTWRAP_DOM = el.querySelector(
|
|
const SELECTWRAP_DOM = el.querySelector(
|
|
- '.el-select-dropdown .el-select-dropdown__wrap'
|
|
|
|
- )
|
|
|
|
- SELECTWRAP_DOM.addEventListener('scroll', function() {
|
|
|
|
|
|
+ ".el-select-dropdown .el-select-dropdown__wrap"
|
|
|
|
+ );
|
|
|
|
+ SELECTWRAP_DOM.addEventListener("scroll", function () {
|
|
/**
|
|
/**
|
|
* scrollHeight 获取元素内容⾼度(只读)
|
|
* scrollHeight 获取元素内容⾼度(只读)
|
|
* scrollTop 获取或者设置元素的偏移值,常⽤于, 计算滚动条的位置, 当⼀个元素的容器没有产⽣垂直⽅向的滚动条, 那它的scrollTop的值默认为0.
|
|
* scrollTop 获取或者设置元素的偏移值,常⽤于, 计算滚动条的位置, 当⼀个元素的容器没有产⽣垂直⽅向的滚动条, 那它的scrollTop的值默认为0.
|
|
@@ -467,31 +524,31 @@ export default {
|
|
* ele.scrollHeight - ele.scrollTop === ele.clientHeight;
|
|
* ele.scrollHeight - ele.scrollTop === ele.clientHeight;
|
|
*/
|
|
*/
|
|
const condition =
|
|
const condition =
|
|
- this.scrollHeight - this.scrollTop <= this.clientHeight
|
|
|
|
|
|
+ this.scrollHeight - this.scrollTop <= this.clientHeight;
|
|
if (condition) {
|
|
if (condition) {
|
|
- binding.value()
|
|
|
|
|
|
+ binding.value();
|
|
}
|
|
}
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
},
|
|
},
|
|
mixins: [Minxin],
|
|
mixins: [Minxin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
fang: false,
|
|
fang: false,
|
|
- input: '',
|
|
|
|
- baseURL: '',
|
|
|
|
|
|
+ input: "",
|
|
|
|
+ baseURL: "",
|
|
isCondition: 0,
|
|
isCondition: 0,
|
|
searchForm: {
|
|
searchForm: {
|
|
- code: '',
|
|
|
|
- endTime: '',
|
|
|
|
- imgSrc: '',
|
|
|
|
- remark: '',
|
|
|
|
- startTime: '',
|
|
|
|
- title: '',
|
|
|
|
- mainId: '',
|
|
|
|
- mainName: '',
|
|
|
|
- type: ''
|
|
|
|
|
|
+ code: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ imgSrc: "",
|
|
|
|
+ remark: "",
|
|
|
|
+ startTime: "",
|
|
|
|
+ title: "",
|
|
|
|
+ mainId: "",
|
|
|
|
+ mainName: "",
|
|
|
|
+ type: "",
|
|
},
|
|
},
|
|
dataList: [],
|
|
dataList: [],
|
|
addList: [],
|
|
addList: [],
|
|
@@ -502,20 +559,20 @@ export default {
|
|
importFileList: [],
|
|
importFileList: [],
|
|
fileList: [],
|
|
fileList: [],
|
|
options: {},
|
|
options: {},
|
|
- value: '',
|
|
|
|
|
|
+ value: "",
|
|
typeList: [],
|
|
typeList: [],
|
|
walletList: [],
|
|
walletList: [],
|
|
typeOptions: [
|
|
typeOptions: [
|
|
{
|
|
{
|
|
- value: 'PROVISION',
|
|
|
|
- label: '配提'
|
|
|
|
|
|
+ value: "PROVISION",
|
|
|
|
+ label: "配提",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- value: 'LIMIT',
|
|
|
|
- label: '限量'
|
|
|
|
- }
|
|
|
|
|
|
+ value: "LIMIT",
|
|
|
|
+ label: "限量",
|
|
|
|
+ },
|
|
],
|
|
],
|
|
- conditName:'',
|
|
|
|
|
|
+ conditName: "",
|
|
conditionList: [],
|
|
conditionList: [],
|
|
dictList: [],
|
|
dictList: [],
|
|
k3List: [],
|
|
k3List: [],
|
|
@@ -523,23 +580,23 @@ export default {
|
|
sleectBox: { currentPage: 1 },
|
|
sleectBox: { currentPage: 1 },
|
|
dpageSize: 10,
|
|
dpageSize: 10,
|
|
dcurrentPage: 1,
|
|
dcurrentPage: 1,
|
|
- rebateList: []
|
|
|
|
- }
|
|
|
|
|
|
+ rebateList: [],
|
|
|
|
+ };
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters({
|
|
...mapGetters({
|
|
- comCode: 'code'
|
|
|
|
- })
|
|
|
|
|
|
+ comCode: "code",
|
|
|
|
+ }),
|
|
},
|
|
},
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
- this.searchForm.code = this.comCode
|
|
|
|
|
|
+ this.searchForm.code = this.comCode;
|
|
},
|
|
},
|
|
updated() {
|
|
updated() {
|
|
- this.searchForm.code = this.comCode
|
|
|
|
|
|
+ this.searchForm.code = this.comCode;
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getCommonApi()
|
|
|
|
|
|
+ this.getCommonApi();
|
|
// console.log(this.$store.code);
|
|
// console.log(this.$store.code);
|
|
|
|
|
|
if (this.$parent.isFlag) {
|
|
if (this.$parent.isFlag) {
|
|
@@ -547,81 +604,80 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapMutations('sales', ['initData']),
|
|
|
|
|
|
+ ...mapMutations("sales", ["initData"]),
|
|
// 下载excel模板
|
|
// 下载excel模板
|
|
hanleDownloadFiles() {
|
|
hanleDownloadFiles() {
|
|
- downloadFiles('/policy/download')
|
|
|
|
|
|
+ downloadFiles("/policy/download");
|
|
},
|
|
},
|
|
handleCondition(id, index) {
|
|
handleCondition(id, index) {
|
|
deleteCondition({ id }).then((res) => {
|
|
deleteCondition({ id }).then((res) => {
|
|
- this.conditionList.splice(index, 1)
|
|
|
|
|
|
+ this.conditionList.splice(index, 1);
|
|
Object.assign(
|
|
Object.assign(
|
|
this.$children[9].$data,
|
|
this.$children[9].$data,
|
|
this.$children[9].$options.data()
|
|
this.$children[9].$options.data()
|
|
- )
|
|
|
|
- this.$successMsg('删除成功')
|
|
|
|
- })
|
|
|
|
|
|
+ );
|
|
|
|
+ this.$successMsg("删除成功");
|
|
|
|
+ });
|
|
},
|
|
},
|
|
loadmore() {
|
|
loadmore() {
|
|
- this.sleectBox.currentPage++
|
|
|
|
- this.getK3List()
|
|
|
|
|
|
+ this.sleectBox.currentPage++;
|
|
|
|
+ this.getK3List();
|
|
},
|
|
},
|
|
getK3List() {
|
|
getK3List() {
|
|
getK3List({
|
|
getK3List({
|
|
pageNum: this.sleectBox.currentPage,
|
|
pageNum: this.sleectBox.currentPage,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- keyword: ''
|
|
|
|
-
|
|
|
|
|
|
+ keyword: "",
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.k3List = [...this.k3List, ...res.data.records]
|
|
|
|
- })
|
|
|
|
|
|
+ this.k3List = [...this.k3List, ...res.data.records];
|
|
|
|
+ });
|
|
},
|
|
},
|
|
remoteMethod(query, type) {
|
|
remoteMethod(query, type) {
|
|
- console.log(query, type)
|
|
|
|
- if (query !== '') {
|
|
|
|
|
|
+ console.log(query, type);
|
|
|
|
+ if (query !== "") {
|
|
getK3List({
|
|
getK3List({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 100,
|
|
pageSize: 100,
|
|
- keyword: '',
|
|
|
|
- number: type === 'number' ? query : '',
|
|
|
|
- oldNumber: '',
|
|
|
|
- specification: type === 'specification' ? query : ''
|
|
|
|
|
|
+ keyword: "",
|
|
|
|
+ number: type === "number" ? query : "",
|
|
|
|
+ oldNumber: "",
|
|
|
|
+ specification: type === "specification" ? query : "",
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.k3List = res.data.records
|
|
|
|
- })
|
|
|
|
|
|
+ this.k3List = res.data.records;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
- this.sleectBox.currentPage = 1
|
|
|
|
- this.getK3List()
|
|
|
|
|
|
+ this.sleectBox.currentPage = 1;
|
|
|
|
+ this.getK3List();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getCommonApi() {
|
|
getCommonApi() {
|
|
- this.getK3List()
|
|
|
|
|
|
+ this.getK3List();
|
|
// 非返利钱包
|
|
// 非返利钱包
|
|
- getNoRebateWalletList({ walletName: '' }).then((res) => {
|
|
|
|
- this.NoRebateWalletList = res.data
|
|
|
|
- console.log(this.NoRebateWalletList, 'kkkk')
|
|
|
|
- })
|
|
|
|
|
|
+ getNoRebateWalletList({ walletName: "" }).then((res) => {
|
|
|
|
+ this.NoRebateWalletList = res.data;
|
|
|
|
+ console.log(this.NoRebateWalletList, "kkkk");
|
|
|
|
+ });
|
|
getWalletRebateList({
|
|
getWalletRebateList({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: -2,
|
|
pageSize: -2,
|
|
- name: '',
|
|
|
|
- status: true
|
|
|
|
- }).then(res => {
|
|
|
|
- this.rebateList = res.data.records
|
|
|
|
- console.log(this.rebateList, 'fanlie')
|
|
|
|
- })
|
|
|
|
|
|
+ name: "",
|
|
|
|
+ status: true,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.rebateList = res.data.records;
|
|
|
|
+ console.log(this.rebateList, "fanlie");
|
|
|
|
+ });
|
|
const params = {
|
|
const params = {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: -1,
|
|
pageSize: -1,
|
|
- saleCode: '',
|
|
|
|
- saleName: '',
|
|
|
|
- status: ''
|
|
|
|
- }
|
|
|
|
|
|
+ saleCode: "",
|
|
|
|
+ saleName: "",
|
|
|
|
+ status: "",
|
|
|
|
+ };
|
|
// 获取销售类型列表
|
|
// 获取销售类型列表
|
|
getTypeList(params).then((res) => {
|
|
getTypeList(params).then((res) => {
|
|
- this.typeList = res.data.records
|
|
|
|
- console.log(this.typeList, 'xioahsou')
|
|
|
|
- })
|
|
|
|
|
|
+ this.typeList = res.data.records;
|
|
|
|
+ console.log(this.typeList, "xioahsou");
|
|
|
|
+ });
|
|
// this.handletwoList()
|
|
// this.handletwoList()
|
|
// const params = {
|
|
// const params = {
|
|
// pageNum: 1,
|
|
// pageNum: 1,
|
|
@@ -648,312 +704,319 @@ export default {
|
|
},
|
|
},
|
|
handleSalesType(e, row) {
|
|
handleSalesType(e, row) {
|
|
const item = this.typeList.filter((k) => {
|
|
const item = this.typeList.filter((k) => {
|
|
- return k.id === e
|
|
|
|
- })[0]
|
|
|
|
- const linshi = []
|
|
|
|
- const rebateList = []
|
|
|
|
|
|
+ return k.id === e;
|
|
|
|
+ })[0];
|
|
|
|
+ const linshi = [];
|
|
|
|
+ const rebateList = [];
|
|
this.rebateList.forEach((k) => {
|
|
this.rebateList.forEach((k) => {
|
|
k.saleTypes.forEach((j) => {
|
|
k.saleTypes.forEach((j) => {
|
|
if (!linshi.includes(j.saleTypeId) && j.saleTypeId === e) {
|
|
if (!linshi.includes(j.saleTypeId) && j.saleTypeId === e) {
|
|
- rebateList.push(k)
|
|
|
|
- linshi.push(j.saleTypeId)
|
|
|
|
|
|
+ rebateList.push(k);
|
|
|
|
+ linshi.push(j.saleTypeId);
|
|
}
|
|
}
|
|
- })
|
|
|
|
- })
|
|
|
|
- if (rebateList.length){
|
|
|
|
- this.$set(row,'rebateWalletIds',[...new Set([...row.rebateWalletIds,rebateList[0].walletRebateId])])
|
|
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ if (rebateList.length) {
|
|
|
|
+ this.$set(row, "rebateWalletIds", [
|
|
|
|
+ ...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId]),
|
|
|
|
+ ]);
|
|
}
|
|
}
|
|
|
|
|
|
- this.$set(row, 'saleTypeCode', item.saleCode)
|
|
|
|
- this.$set(row, 'saleTypeName', item.saleName)
|
|
|
|
|
|
+ this.$set(row, "saleTypeCode", item.saleCode);
|
|
|
|
+ this.$set(row, "saleTypeName", item.saleName);
|
|
// this.$set(row,'saleTypeId',item.id)
|
|
// this.$set(row,'saleTypeId',item.id)
|
|
},
|
|
},
|
|
// 修改条件名称
|
|
// 修改条件名称
|
|
handleConditionName(row) {
|
|
handleConditionName(row) {
|
|
- console.log(row.name)
|
|
|
|
- if (this.conditName !== row.name){
|
|
|
|
|
|
+ console.log(row.name);
|
|
|
|
+ if (this.conditName !== row.name) {
|
|
updateCondition({ id: row.id, name: row.name }).then((res) => {
|
|
updateCondition({ id: row.id, name: row.name }).then((res) => {
|
|
- this.$successMsg('修改成功')
|
|
|
|
- })
|
|
|
|
|
|
+ this.$successMsg("修改成功");
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- row.fang = true
|
|
|
|
|
|
+ row.fang = true;
|
|
},
|
|
},
|
|
// 提交信息
|
|
// 提交信息
|
|
handleSubmitCon() {
|
|
handleSubmitCon() {
|
|
const params = {
|
|
const params = {
|
|
- policyId: this.comCode
|
|
|
|
- }
|
|
|
|
|
|
+ policyId: this.comCode,
|
|
|
|
+ };
|
|
// 获取条件政策
|
|
// 获取条件政策
|
|
getConditionList(params).then((res) => {
|
|
getConditionList(params).then((res) => {
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
- res.data[i].fang = true
|
|
|
|
|
|
+ res.data[i].fang = true;
|
|
}
|
|
}
|
|
- this.conditionList = res.data
|
|
|
|
- })
|
|
|
|
|
|
+ this.conditionList = res.data;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 视图部分已注释,废弃的功能 fucn
|
|
// 视图部分已注释,废弃的功能 fucn
|
|
handelStop() {
|
|
handelStop() {
|
|
if (this.searchForm.mainId) {
|
|
if (this.searchForm.mainId) {
|
|
- this.fang = true
|
|
|
|
|
|
+ this.fang = true;
|
|
} else {
|
|
} else {
|
|
- this.$errorMsg('请选择产品品类')
|
|
|
|
|
|
+ this.$errorMsg("请选择产品品类");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 导入
|
|
// 导入
|
|
async handleImport(param) {
|
|
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.searchForm.code)
|
|
|
|
|
|
+ this.importLoading = true;
|
|
|
|
+ const file = param.file;
|
|
|
|
+ console.log(file, 123);
|
|
|
|
+ const formData = new FormData();
|
|
|
|
+ formData.append("file", file);
|
|
|
|
+ formData.append("policyId", this.searchForm.code);
|
|
// formData.append("mainId", this.searchForm.mainId);
|
|
// formData.append("mainId", this.searchForm.mainId);
|
|
- const 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) {
|
|
if (result.code === 200) {
|
|
- this.$alert(result.message, '导入成功', {
|
|
|
|
- confirmButtonText: '确定'
|
|
|
|
- })
|
|
|
|
- this.dataList = []
|
|
|
|
- this.listTotal = 0
|
|
|
|
- this.sleectBox.currentPage = 1
|
|
|
|
- this.handletwoList()
|
|
|
|
|
|
+ this.$alert(result.message, "导入成功", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ });
|
|
|
|
+ this.dataList = [];
|
|
|
|
+ this.listTotal = 0;
|
|
|
|
+ this.sleectBox.currentPage = 1;
|
|
|
|
+ this.handletwoList();
|
|
} else {
|
|
} else {
|
|
- this.$alert(result.message, '导入失败', {
|
|
|
|
- confirmButtonText: '确定'
|
|
|
|
- })
|
|
|
|
|
|
+ this.$alert(result.message, "导入失败", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getList() {
|
|
getList() {
|
|
if (this.$parent.isFlag) {
|
|
if (this.$parent.isFlag) {
|
|
- this.handletwoList()
|
|
|
|
|
|
+ this.handletwoList();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 更改每页数量
|
|
// 更改每页数量
|
|
handleSizeChange1(val) {
|
|
handleSizeChange1(val) {
|
|
- this.pageSize = val
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.handletwoList()
|
|
|
|
|
|
+ this.pageSize = val;
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.handletwoList();
|
|
},
|
|
},
|
|
// 更改当前页
|
|
// 更改当前页
|
|
handleCurrentChange1(val) {
|
|
handleCurrentChange1(val) {
|
|
- this.currentPage = val
|
|
|
|
- this.handletwoList()
|
|
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.handletwoList();
|
|
},
|
|
},
|
|
|
|
|
|
// 更改每页数量
|
|
// 更改每页数量
|
|
handleSizeChange2(val) {
|
|
handleSizeChange2(val) {
|
|
- this.dpageSize = val
|
|
|
|
- this.dcurrentPage = 1
|
|
|
|
|
|
+ this.dpageSize = val;
|
|
|
|
+ this.dcurrentPage = 1;
|
|
|
|
|
|
- this.handletwoList()
|
|
|
|
|
|
+ this.handletwoList();
|
|
},
|
|
},
|
|
// 更改当前页
|
|
// 更改当前页
|
|
handleCurrentChange2(val) {
|
|
handleCurrentChange2(val) {
|
|
- this.dcurrentPage = val
|
|
|
|
- this.handletwoList()
|
|
|
|
|
|
+ this.dcurrentPage = val;
|
|
|
|
+ this.handletwoList();
|
|
},
|
|
},
|
|
// 获取货品信息
|
|
// 获取货品信息
|
|
handletwoList() {
|
|
handletwoList() {
|
|
// this.searchForm.type
|
|
// this.searchForm.type
|
|
- this.listLoading = true
|
|
|
|
|
|
+ this.listLoading = true;
|
|
|
|
|
|
const paramss = {
|
|
const paramss = {
|
|
pageNum: this.dcurrentPage,
|
|
pageNum: this.dcurrentPage,
|
|
pageSize: this.dpageSize,
|
|
pageSize: this.dpageSize,
|
|
policyId: this.comCode,
|
|
policyId: this.comCode,
|
|
- saleTypeCode: ''
|
|
|
|
- }
|
|
|
|
|
|
+ saleTypeCode: "",
|
|
|
|
+ };
|
|
|
|
|
|
getMaterialList(paramss)
|
|
getMaterialList(paramss)
|
|
.then((result) => {
|
|
.then((result) => {
|
|
result.data.records.forEach((k) => {
|
|
result.data.records.forEach((k) => {
|
|
- k.walletIds = []
|
|
|
|
- k.rebateWalletIds = []
|
|
|
|
|
|
+ k.walletIds = [];
|
|
|
|
+ k.rebateWalletIds = [];
|
|
if (!k.specification) {
|
|
if (!k.specification) {
|
|
- k.materialNumber = k.materialId
|
|
|
|
- k.specification = k.materialId
|
|
|
|
|
|
+ k.materialNumber = k.materialId;
|
|
|
|
+ k.specification = k.materialId;
|
|
}
|
|
}
|
|
|
|
|
|
k.walletRelaList.forEach((l) => {
|
|
k.walletRelaList.forEach((l) => {
|
|
- l.id = l.walletId
|
|
|
|
- l.name = l.walletName
|
|
|
|
- if (l.type==='REBATE'){
|
|
|
|
- k.rebateWalletIds = [...k.rebateWalletIds, l.walletId]
|
|
|
|
- }else {
|
|
|
|
- k.walletIds = [...k.walletIds, l.walletId]
|
|
|
|
|
|
+ l.id = l.walletId;
|
|
|
|
+ l.name = l.walletName;
|
|
|
|
+ if (l.type === "REBATE") {
|
|
|
|
+ k.rebateWalletIds = [...k.rebateWalletIds, l.walletId];
|
|
|
|
+ } else {
|
|
|
|
+ k.walletIds = [...k.walletIds, l.walletId];
|
|
}
|
|
}
|
|
// k.walletIds = [...k.walletIds, l.walletId]
|
|
// k.walletIds = [...k.walletIds, l.walletId]
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ });
|
|
// this.dataList=[]
|
|
// this.dataList=[]
|
|
- this.dataList = result.data.records
|
|
|
|
- this.listTotal = result.data.total
|
|
|
|
- this.listLoading = false
|
|
|
|
|
|
+ this.dataList = result.data.records;
|
|
|
|
+ this.listTotal = result.data.total;
|
|
|
|
+ this.listLoading = false;
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
- console.error(err)
|
|
|
|
|
|
+ console.error(err);
|
|
// this.listLoading = false
|
|
// this.listLoading = false
|
|
- })
|
|
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 提交审核
|
|
// 提交审核
|
|
handleAddPolicy(policyCustomers) {
|
|
handleAddPolicy(policyCustomers) {
|
|
if (!this.searchForm.title) {
|
|
if (!this.searchForm.title) {
|
|
- this.$errorMsg('请输入说明')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请输入说明");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (!this.searchForm.type) {
|
|
if (!this.searchForm.type) {
|
|
- this.$errorMsg('请选择类型')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请选择类型");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (!this.searchForm.startTime) {
|
|
if (!this.searchForm.startTime) {
|
|
- this.$errorMsg('请选择生效日期')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请选择生效日期");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
if (policyCustomers.length) {
|
|
if (policyCustomers.length) {
|
|
- var arr = []
|
|
|
|
|
|
+ var arr = [];
|
|
policyCustomers.forEach((el) => {
|
|
policyCustomers.forEach((el) => {
|
|
arr.push({
|
|
arr.push({
|
|
customerId: el.id,
|
|
customerId: el.id,
|
|
customerName: el.name,
|
|
customerName: el.name,
|
|
customerNumber: el.number,
|
|
customerNumber: el.number,
|
|
- lastOrderTime: '',
|
|
|
|
|
|
+ lastOrderTime: "",
|
|
limitTakeNum: 0,
|
|
limitTakeNum: 0,
|
|
policyId: this.comCode,
|
|
policyId: this.comCode,
|
|
- policyTitle: '',
|
|
|
|
- remark: ''
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ policyTitle: "",
|
|
|
|
+ remark: "",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
// this.dictList.forEach((k) => {
|
|
// this.dictList.forEach((k) => {
|
|
// if (k.dictCode == this.searchForm.mainId) {
|
|
// if (k.dictCode == this.searchForm.mainId) {
|
|
// this.searchForm.mainName = k.dictValue;
|
|
// this.searchForm.mainName = k.dictValue;
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
const params = {
|
|
const params = {
|
|
- adminCompanyId: '',
|
|
|
|
- code: '',
|
|
|
|
|
|
+ adminCompanyId: "",
|
|
|
|
+ code: "",
|
|
customerCount: 0,
|
|
customerCount: 0,
|
|
- examineBy: '',
|
|
|
|
- examineRemark: '',
|
|
|
|
- examineStatus: '',
|
|
|
|
- id: '',
|
|
|
|
|
|
+ examineBy: "",
|
|
|
|
+ examineRemark: "",
|
|
|
|
+ examineStatus: "",
|
|
|
|
+ id: "",
|
|
policyCustomers: arr,
|
|
policyCustomers: arr,
|
|
- remark: '',
|
|
|
|
|
|
+ remark: "",
|
|
status: true,
|
|
status: true,
|
|
- title: '',
|
|
|
|
- type: '',
|
|
|
|
|
|
+ title: "",
|
|
|
|
+ type: "",
|
|
...this.searchForm,
|
|
...this.searchForm,
|
|
- endTime: this.searchForm.endTime || '2100-01-01 00:00:00',
|
|
|
|
- imgSrc: this.fileList.length ? this.fileList[0].url : ''
|
|
|
|
- }
|
|
|
|
- console.log(this.fileList)
|
|
|
|
|
|
+ endTime: this.searchForm.endTime || "2100-01-01 00:00:00",
|
|
|
|
+ imgSrc: this.fileList.length ? this.fileList[0].url : "",
|
|
|
|
+ };
|
|
|
|
+ console.log(this.fileList);
|
|
addPoliy(params).then((res) => {
|
|
addPoliy(params).then((res) => {
|
|
- console.log(res)
|
|
|
|
- this.$successMsg('新增成功')
|
|
|
|
- this.$parent.getList()
|
|
|
|
- this.$parent.isShow = 1
|
|
|
|
- })
|
|
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.$successMsg("新增成功");
|
|
|
|
+ this.$parent.getList();
|
|
|
|
+ this.$parent.isShow = 1;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
- this.$errorMsg('选择经销商 ')
|
|
|
|
|
|
+ this.$errorMsg("选择经销商 ");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
hanleDelete(id, index) {
|
|
hanleDelete(id, index) {
|
|
if (id) {
|
|
if (id) {
|
|
- const params = { policyMaterialId: id }
|
|
|
|
|
|
+ const params = { policyMaterialId: id };
|
|
deleteMaterialPolicy(params).then((res) => {
|
|
deleteMaterialPolicy(params).then((res) => {
|
|
- this.dataList.splice(index, 1)
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
|
|
+ this.dataList.splice(index, 1);
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- this.dataList.splice(index, 1)
|
|
|
|
|
|
+ this.dataList.splice(index, 1);
|
|
// this.listTotal -= 1;
|
|
// this.listTotal -= 1;
|
|
- this.$successMsg('删除成功')
|
|
|
|
|
|
+ this.$successMsg("删除成功");
|
|
},
|
|
},
|
|
handleNewInfo() {
|
|
handleNewInfo() {
|
|
// 物料列表
|
|
// 物料列表
|
|
|
|
|
|
this.dataList.push({
|
|
this.dataList.push({
|
|
- id: '',
|
|
|
|
|
|
+ id: "",
|
|
discAmount: 0,
|
|
discAmount: 0,
|
|
- materialId: '',
|
|
|
|
- materialName: '',
|
|
|
|
- materialNumber: '',
|
|
|
|
|
|
+ materialId: "",
|
|
|
|
+ materialName: "",
|
|
|
|
+ materialNumber: "",
|
|
policyId: this.comCode,
|
|
policyId: this.comCode,
|
|
- price: '',
|
|
|
|
- remark: '',
|
|
|
|
- saleTypeCode: '',
|
|
|
|
- saleTypeId: '',
|
|
|
|
- saleTypeName: '',
|
|
|
|
- specification: '',
|
|
|
|
|
|
+ price: "",
|
|
|
|
+ remark: "",
|
|
|
|
+ saleTypeCode: "",
|
|
|
|
+ saleTypeId: "",
|
|
|
|
+ saleTypeName: "",
|
|
|
|
+ specification: "",
|
|
rebateWalletIds: [],
|
|
rebateWalletIds: [],
|
|
walletIds: [this.NoRebateWalletList[0].id],
|
|
walletIds: [this.NoRebateWalletList[0].id],
|
|
- walletRelaList: []
|
|
|
|
- })
|
|
|
|
- this.sleectBox.currentPage = 1
|
|
|
|
|
|
+ walletRelaList: [],
|
|
|
|
+ });
|
|
|
|
+ this.sleectBox.currentPage = 1;
|
|
// this.listTotal += 1;
|
|
// this.listTotal += 1;
|
|
// this.dataList.push(this.addList[this.addList.length-1])
|
|
// this.dataList.push(this.addList[this.addList.length-1])
|
|
},
|
|
},
|
|
handleSave() {
|
|
handleSave() {
|
|
if (!this.dataList.length) {
|
|
if (!this.dataList.length) {
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (!this.dataList[i].materialId) {
|
|
if (!this.dataList[i].materialId) {
|
|
- this.$errorMsg('请选择货品')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请选择货品");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (!this.dataList[i].saleTypeId) {
|
|
if (!this.dataList[i].saleTypeId) {
|
|
- this.$errorMsg('请选择销售类型')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请选择销售类型");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
if (!this.dataList[i].price) {
|
|
if (!this.dataList[i].price) {
|
|
- this.$errorMsg('请输入单价')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请输入单价");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (!this.dataList[i].walletIds.length) {
|
|
if (!this.dataList[i].walletIds.length) {
|
|
- this.$errorMsg('请选择支付钱包')
|
|
|
|
- return
|
|
|
|
|
|
+ this.$errorMsg("请选择支付钱包");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
savePolicy(this.dataList).then((res) => {
|
|
savePolicy(this.dataList).then((res) => {
|
|
- this.dataList = []
|
|
|
|
- this.sleectBox.currentPage = 1
|
|
|
|
- this.$successMsg('保存成功')
|
|
|
|
- this.handletwoList()
|
|
|
|
- })
|
|
|
|
|
|
+ this.dataList = [];
|
|
|
|
+ this.sleectBox.currentPage = 1;
|
|
|
|
+ this.$successMsg("保存成功");
|
|
|
|
+ this.handletwoList();
|
|
|
|
+ });
|
|
},
|
|
},
|
|
handleK3List(e, row) {
|
|
handleK3List(e, row) {
|
|
const item = this.k3List.filter((k) => {
|
|
const item = this.k3List.filter((k) => {
|
|
- return k.id == e
|
|
|
|
- })[0]
|
|
|
|
- this.$set(row, 'materialNumber', item.number)
|
|
|
|
- this.$set(row, 'materialName', item.name)
|
|
|
|
- this.$set(row, 'specification', item.specification)
|
|
|
|
- this.$set(row, 'materialId', item.id)
|
|
|
|
- this.getK3List()
|
|
|
|
|
|
+ return k.id == e;
|
|
|
|
+ })[0];
|
|
|
|
+ this.$set(row, "materialNumber", item.number);
|
|
|
|
+ this.$set(row, "materialName", item.name);
|
|
|
|
+ this.$set(row, "specification", item.specification);
|
|
|
|
+ this.$set(row, "materialId", item.id);
|
|
|
|
+ this.getK3List();
|
|
},
|
|
},
|
|
handleReset() {
|
|
handleReset() {
|
|
- Object.assign(this.$data, this.$options.data())
|
|
|
|
- this.getCommonApi()
|
|
|
|
- }
|
|
|
|
|
|
+ Object.assign(this.$data, this.$options.data());
|
|
|
|
+ this.getCommonApi();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
TabelTransfer,
|
|
TabelTransfer,
|
|
AddCondition,
|
|
AddCondition,
|
|
- ImageUpload
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ ImageUpload,
|
|
|
|
+ },
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
h4 {
|
|
h4 {
|
|
margin: 0;
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
+.yinput{
|
|
|
|
+ ::v-deep input{
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
|
|
+}
|
|
.pdt {
|
|
.pdt {
|
|
padding-top: 20px;
|
|
padding-top: 20px;
|
|
}
|
|
}
|