Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
c4ef5199
Commit
c4ef5199
authored
Aug 18, 2021
by
lihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 邮箱+商品限制
parent
947cffe9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
266 additions
and
195 deletions
+266
-195
YDDialoag.vue
src/components/Dialog/YDDialoag.vue
+0
-1
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+156
-58
myMap.vue
src/pages/Activity/releaseProduc/components/myMap.vue
+1
-1
spellOrderSet.vue
...pages/Activity/releaseProduc/components/spellOrderSet.vue
+1
-1
index.vue
src/pages/Groupmeal/Distrib/index.vue
+25
-25
index.vue
src/pages/Groupmeal/components/Pagination/index.vue
+3
-5
index.vue
src/pages/Life-no/index.vue
+51
-88
Pagination.vue
src/pages/components/Pagination.vue
+10
-10
vue.config.js
vue.config.js
+19
-6
No files found.
src/components/Dialog/YDDialoag.vue
View file @
c4ef5199
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
v-model=
"dialogVisible"
v-model=
"dialogVisible"
:width=
"dialogWidth"
:width=
"dialogWidth"
:show-close=
"showDialogClose"
:show-close=
"showDialogClose"
:before-close=
"handleClose"
:top=
"dialogMarginTop"
:top=
"dialogMarginTop"
:modal=
"dialogModel"
:modal=
"dialogModel"
:close-on-click-modal=
"dialogCloseOnClickModal"
:close-on-click-modal=
"dialogCloseOnClickModal"
...
...
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
c4ef5199
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<el-dialog
<el-dialog
:title=
"addCommodityTitle"
:title=
"addCommodityTitle"
v-model=
"addCommodityPopup"
v-model=
"addCommodityPopup"
width=
"
4
0%"
width=
"
5
0%"
>
>
<el-form
<el-form
:inline=
"true"
:inline=
"true"
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
placeholder=
""
placeholder=
""
></el-input-number>
></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
label=
"划线价:"
>
<el-form-item
label=
"划线价:"
prop=
"original_price"
>
<el-input-number
<el-input-number
class=
"price"
class=
"price"
v-model=
"commodityForm.original_price"
v-model=
"commodityForm.original_price"
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
></el-input-number>
></el-input-number>
</el-form-item>
</el-form-item>
<br
/>
<br
/>
<el-form-item
label=
"新增库存:"
>
<el-form-item
label=
"新增库存:"
prop=
"inventory_total"
>
<el-input
<el-input
v-model=
"commodityForm.inventory_total"
v-model=
"commodityForm.inventory_total"
placeholder=
""
placeholder=
""
...
@@ -132,7 +132,54 @@
...
@@ -132,7 +132,54 @@
}}
</span>
}}
</span>
剩余库存:
<span>
{{ inventoryRest }}
</span>
剩余库存:
<span>
{{ inventoryRest }}
</span>
</div>
</div>
<br
/>
<div
class=
"purse_limit"
>
<el-form-item
prop=
"checkedRadio"
:rules=
"[
{
required: true,
message: '请选择购买限制',
trigger: 'change'
}
]"
class=
"limit_radio"
label=
"购买限制"
>
<el-radio-group
v-model=
"commodityForm.checkedRadio"
>
<el-radio
label=
"不限制"
></el-radio>
<el-radio
label=
"每人最多买"
></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
prop=
"num_limit"
:show-message=
"
commodityForm.checkedRadio === '每人最多买' ? ture : false
"
:rules=
"[
{
validator:
commodityForm.checkedRadio === '每人最多买'
? checkPurseLimit
: checkPurseLimitNull,
trigger: 'blur'
}
]"
>
<el-input-number
v-model=
"commodityForm.num_limit"
:disabled=
"
commodityForm.checkedRadio === '' ||
commodityForm.checkedRadio === '不限制' ||
commodityForm.checkedRadio === undefined
? true
: false
"
:min=
"0"
:controls=
"false"
></el-input-number>
</el-form-item>
</div>
<el-form-item
<el-form-item
label=
"商家"
label=
"商家"
prop=
"business1"
prop=
"business1"
...
@@ -241,44 +288,56 @@ import {
...
@@ -241,44 +288,56 @@ import {
getBusinessList
,
getBusinessList
,
pindanGoods
,
pindanGoods
,
markGoodsInfo
,
markGoodsInfo
,
editGoods
,
editGoods
}
from
"../../../../service/Activity/index"
;
}
from
"../../../../service/Activity/index"
;
// 当选择(每人最多买时 添加验证(非空))
let
checkPurseLimit
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
""
||
value
===
0
)
{
return
callback
(
new
Error
(
"请添加限制购买数量"
));
}
else
{
callback
();
}
};
let
checkPurseLimitNull
=
(
rule
,
value
,
callback
)
=>
{
callback
();
};
export
default
{
var
addProduct
=
{
props
:
{
props
:
{
editInfo
:
{
editInfo
:
{
type
:
Object
,
type
:
Object
,
required
:
()
=>
{}
,
required
:
()
=>
{}
},
},
addProduc
:
{
addProduc
:
{
type
:
Array
,
type
:
Array
,
required
:
()
=>
{}
,
required
:
()
=>
{}
},
},
stepTwoTitle
:
{
stepTwoTitle
:
{
type
:
String
,
type
:
String
,
default
:
""
,
default
:
""
}
,
}
},
},
data
()
{
data
()
{
return
{
return
{
// 校验规则函数
checkPurseLimit
:
checkPurseLimit
,
checkPurseLimitNull
:
checkPurseLimitNull
,
// 商品列表
// 商品列表
comTableData
:
[],
comTableData
:
[],
// 商品库列表
// 商品库列表
comLibTableData
:
[],
comLibTableData
:
[],
businessOpt
:
[],
// 商家数据
businessOpt
:
[],
// 商家数据
// 添加商品
addCommodityPopup
:
false
,
// 添加商品弹窗状态
addCommodityPopup
:
false
,
// 添加商品弹窗状态
addCommodityTitle
:
""
,
// 标题
addCommodityTitle
:
""
,
// 标题
commodityForm
:
{
commodityForm
:
{
goods_name
:
""
,
goods_name
:
""
,
price
:
""
,
price
:
null
,
original_price
:
""
,
original_price
:
null
,
inventory_total
:
null
,
inventory_total
:
null
,
total_amount_order
:
null
,
total_amount_order
:
null
,
business1
:
""
,
business1
:
""
,
num_limit
:
0
,
// 购买限制数量
checkedRadio
:
""
// 购买限制radio
},
},
picStr
:
""
,
picStr
:
""
,
picUrlList
:
[],
picUrlList
:
[],
...
@@ -296,22 +355,9 @@ export default {
...
@@ -296,22 +355,9 @@ export default {
goodsSkuID
:
""
,
goodsSkuID
:
""
,
inventoryTotal
:
0
,
// 总库存
inventoryTotal
:
0
,
// 总库存
inventoryRest
:
0
,
// 剩余库存
inventoryRest
:
0
// 剩余库存
};
};
},
},
// computed: {
// // 计算剩余库存
// inventoryRest() {
// if (this.commodityForm.inventory_total == null) {
// return 0;
// } else {
// return Number(
// this.commodityForm.inventory_total -
// this.commodityForm.total_amount_order
// );
// }
// },
// },
methods
:
{
methods
:
{
// 上移
// 上移
upMove
(
index
)
{
upMove
(
index
)
{
...
@@ -381,7 +427,7 @@ export default {
...
@@ -381,7 +427,7 @@ export default {
const
res
=
await
getBusinessList
(
params
);
const
res
=
await
getBusinessList
(
params
);
this
.
businessOpt
=
[
this
.
businessOpt
=
[
{
ota_id
:
""
,
ota_name
:
"全部"
},
{
ota_id
:
""
,
ota_name
:
"全部"
},
...
res
.
result
.
list
,
...
res
.
result
.
list
];
];
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
...
@@ -389,18 +435,24 @@ export default {
...
@@ -389,18 +435,24 @@ export default {
}
}
},
},
// 查看商品详情
// 查看商品详情
(api)
async
markGoodsInfoMet
(
goodSkuID
)
{
async
markGoodsInfoMet
(
goodSkuID
)
{
let
params
=
{
goods_sku_id
:
goodSkuID
,
marketing_type
:
"4"
};
let
params
=
{
goods_sku_id
:
goodSkuID
,
marketing_type
:
"4"
};
const
res
=
await
markGoodsInfo
(
params
);
const
res
=
await
markGoodsInfo
(
params
);
this
.
inventoryRest
=
res
.
result
.
goods_info
.
inventory_rest
;
this
.
inventoryRest
=
res
.
result
.
goods_info
.
inventory_rest
;
this
.
inventoryTotal
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
inventoryTotal
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
commodityForm
=
res
.
result
.
goods_info
;
this
.
commodityForm
=
res
.
result
.
goods_info
;
this
.
commodityForm
.
num_limit
=
res
.
result
.
goods_info
.
rule_limit
;
// 购买限制的数量
this
.
commodityForm
.
checkedRadio
=
res
.
result
.
goods_info
.
rule_limit
===
0
||
res
.
result
.
goods_info
.
rule_limit
===
undefined
?
"不限制"
:
"每人最多买"
;
// 购买限制按钮选择
this
.
commodityForm
.
business1
=
res
.
result
.
goods_info
.
ota_id
;
this
.
commodityForm
.
business1
=
res
.
result
.
goods_info
.
ota_id
;
this
.
picUrlList
=
[];
this
.
picUrlList
=
[];
for
(
var
i
in
res
.
result
.
goods_info
.
desc_pic_url_list
)
{
for
(
var
i
in
res
.
result
.
goods_info
.
desc_pic_url_list
)
{
this
.
picUrlList
.
push
({
this
.
picUrlList
.
push
({
url
:
res
.
result
.
goods_info
.
desc_pic_url_list
[
i
]
,
url
:
res
.
result
.
goods_info
.
desc_pic_url_list
[
i
]
});
});
}
}
this
.
picStr
=
this
.
getUrlParms
(
this
.
picStr
=
this
.
getUrlParms
(
...
@@ -415,7 +467,7 @@ export default {
...
@@ -415,7 +467,7 @@ export default {
return
""
;
return
""
;
},
},
//
编辑商品详情
//
修改商品详情(api)
async
editGoodsMet
(
goodsSkuID
)
{
async
editGoodsMet
(
goodsSkuID
)
{
const
res
=
await
editGoods
({
const
res
=
await
editGoods
({
goods_name
:
this
.
commodityForm
.
goods_name
,
goods_name
:
this
.
commodityForm
.
goods_name
,
...
@@ -429,11 +481,17 @@ export default {
...
@@ -429,11 +481,17 @@ export default {
ota_id
:
this
.
commodityForm
.
business1
,
ota_id
:
this
.
commodityForm
.
business1
,
op_cur_user
:
store
.
state
.
userInfo
.
email
,
op_cur_user
:
store
.
state
.
userInfo
.
email
,
goods_sku_id
:
goodsSkuID
,
goods_sku_id
:
goodsSkuID
,
rule_limit
:
this
.
commodityForm
.
checkedRadio
===
"不限制"
||
this
.
commodityForm
.
checkedRadio
===
""
||
this
.
commodityForm
.
checkedRadio
===
undefined
?
0
:
this
.
commodityForm
.
num_limit
});
});
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
ElMessage
.
success
({
ElMessage
.
success
({
message
:
"修改成功"
,
message
:
"修改成功"
,
type
:
"success"
,
type
:
"success"
});
});
await
this
.
pindanGoodsMet
();
await
this
.
pindanGoodsMet
();
let
result
=
null
;
let
result
=
null
;
...
@@ -461,28 +519,34 @@ export default {
...
@@ -461,28 +519,34 @@ export default {
this
.
comLibTableData
=
res
.
result
.
list
;
this
.
comLibTableData
=
res
.
result
.
list
;
},
},
// 添加修改商品
// 添加+修改商品
async
commodity
(
type
,
val
)
{
commodity
(
type
,
val
)
{
this
.
$refs
.
picUpload
&&
this
.
$refs
.
picUpload
.
clearFiles
&&
this
.
$refs
.
picUpload
.
clearFiles
();
// 清楚图片
this
.
$refs
.
picUpload
&&
this
.
$refs
.
picUpload
.
clearFiles
&&
this
.
$refs
.
picUpload
.
clearFiles
();
this
.
picUrlList
=
[];
this
.
picUrlList
=
[];
this
.
picStr
=
''
this
.
picStr
=
""
;
this
.
addCommodityPopup
=
true
;
this
.
addCommodityPopup
=
true
;
this
.
commodityForm
=
{};
// this.commodityForm = {};
this
.
$nextTick
(()
=>
{
this
.
$refs
.
infoForm
.
resetFields
();
// 清空表单数据
});
if
(
type
==
"add"
)
{
if
(
type
==
"add"
)
{
this
.
hideUpload
=
false
;
this
.
hideUpload
=
false
;
this
.
inventoryRest
=
0
;
this
.
inventoryRest
=
0
;
this
.
commodityForm
.
total_amount_order
=
0
;
this
.
commodityForm
.
total_amount_order
=
0
;
this
.
addCommodityTitle
=
"商品添加"
;
this
.
addCommodityTitle
=
"商品添加"
;
this
.
$refs
.
infoForm
.
resetFields
();
}
else
{
}
else
{
this
.
addCommodityTitle
=
"商品编辑"
;
this
.
addCommodityTitle
=
"商品编辑"
;
this
.
goodsSkuID
=
val
.
goods_sku_id
;
this
.
goodsSkuID
=
val
.
goods_sku_id
;
this
.
markGoodsInfoMet
(
this
.
goodsSkuID
);
this
.
markGoodsInfoMet
(
this
.
goodsSkuID
);
// 查看商品详情(api)
}
}
},
},
// 添加商品
// 添加商品
(api)
async
addGoodsMet
()
{
async
addGoodsMet
()
{
const
res
=
await
addGoods
({
const
res
=
await
addGoods
({
marketing_name
:
this
.
stepTwoTitle
,
marketing_name
:
this
.
stepTwoTitle
,
...
@@ -495,14 +559,19 @@ export default {
...
@@ -495,14 +559,19 @@ export default {
price
:
this
.
commodityForm
.
price
,
price
:
this
.
commodityForm
.
price
,
ota_id
:
this
.
commodityForm
.
business1
,
ota_id
:
this
.
commodityForm
.
business1
,
op_cur_user
:
store
.
state
.
userInfo
.
email
,
op_cur_user
:
store
.
state
.
userInfo
.
email
,
rule_limit
:
this
.
commodityForm
.
checkedRadio
===
"不限制"
||
this
.
commodityForm
.
checkedRadio
===
""
||
this
.
commodityForm
.
checkedRadio
===
undefined
?
0
:
this
.
commodityForm
.
num_limit
});
});
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
ElMessage
.
success
({
ElMessage
.
success
({
message
:
"添加商品成功"
,
message
:
"添加商品成功"
,
type
:
"success"
,
type
:
"success"
});
});
this
.
comTableData
.
push
(
res
.
result
.
goods_info
);
this
.
comTableData
.
push
(
res
.
result
.
goods_info
);
// this.$refs.picUpload.clearFiles();
this
.
addCommodityPopup
=
false
;
this
.
addCommodityPopup
=
false
;
}
else
{
}
else
{
ElMessage
.
error
(
res
.
reason
);
ElMessage
.
error
(
res
.
reason
);
...
@@ -515,9 +584,9 @@ export default {
...
@@ -515,9 +584,9 @@ export default {
this
.
$refs
.
infoForm
.
clearValidate
();
this
.
$refs
.
infoForm
.
clearValidate
();
},
},
// 添加商品保存
// 添加商品保存
(操作)
commoditySave
(
infoForm
)
{
commoditySave
(
infoForm
)
{
this
.
$refs
[
infoForm
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
infoForm
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
addCommodityTitle
==
"商品添加"
)
{
if
(
this
.
addCommodityTitle
==
"商品添加"
)
{
this
.
addGoodsMet
();
this
.
addGoodsMet
();
...
@@ -530,6 +599,25 @@ export default {
...
@@ -530,6 +599,25 @@ export default {
});
});
},
},
// commoditySave(infoForm) {
// console.log("baocun");
// this.$refs[infoForm].validate(valid => {
// console.log("00");
// if (valid) {
// console.log("add");
// if (this.addCommodityTitle == "商品添加") {
// this.addGoodsMet();
// } else {
// console.log("xiugai");
// this.editGoodsMet(this.goodsSkuID);
// }
// } else {
// console.log("validate");
// return false;
// }
// });
// },
// 从商品库添加
// 从商品库添加
async
commodLibraryAdd
()
{
async
commodLibraryAdd
()
{
this
.
selCommodityPopup
=
true
;
this
.
selCommodityPopup
=
true
;
...
@@ -556,9 +644,9 @@ export default {
...
@@ -556,9 +644,9 @@ export default {
if
(
this
.
comTableData
.
length
==
0
)
{
if
(
this
.
comTableData
.
length
==
0
)
{
this
.
comTableData
.
push
(...
this
.
multipleSelection
);
this
.
comTableData
.
push
(...
this
.
multipleSelection
);
}
else
{
}
else
{
this
.
multipleSelection
.
forEach
(
(
item
)
=>
{
this
.
multipleSelection
.
forEach
(
item
=>
{
let
num
=
0
;
let
num
=
0
;
this
.
comTableData
.
some
(
(
val
)
=>
{
this
.
comTableData
.
some
(
val
=>
{
num
++
;
num
++
;
if
(
val
.
goods_sku_id
===
item
.
goods_sku_id
)
{
if
(
val
.
goods_sku_id
===
item
.
goods_sku_id
)
{
val
.
goods_sku_id
=
item
.
goods_sku_id
;
val
.
goods_sku_id
=
item
.
goods_sku_id
;
...
@@ -581,31 +669,32 @@ export default {
...
@@ -581,31 +669,32 @@ export default {
this
.
comTableData
.
splice
(
i
,
1
);
this
.
comTableData
.
splice
(
i
,
1
);
}
}
}
}
}
,
}
},
},
watch
:
{
watch
:
{
addProduc
:
function
(
newVal
)
{
addProduc
:
function
(
newVal
)
{
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
if
(
marketingId
==
undefined
)
{
return
;
return
;
}
}
this
.
comTableData
=
newVal
;
this
.
comTableData
=
newVal
;
},
},
picUrlList
:
function
()
{
picUrlList
:
function
()
{
if
(
this
.
picUrlList
.
length
>=
this
.
limitCount
)
{
if
(
this
.
picUrlList
.
length
>=
this
.
limitCount
)
{
this
.
hideUpload
=
true
this
.
hideUpload
=
true
;
}
else
{
}
else
{
this
.
hideUpload
=
false
this
.
hideUpload
=
false
;
}
}
}
}
},
},
created
()
{
created
()
{
this
.
getBusinessListMet
();
this
.
getBusinessListMet
();
}
,
}
};
};
export
default
addProduct
;
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
lang=
"less"
>
.addProduc {
.addProduc {
width: 90%;
width: 90%;
margin: 0 auto;
margin: 0 auto;
...
@@ -641,4 +730,13 @@ export default {
...
@@ -641,4 +730,13 @@ export default {
.hide /deep/ .el-upload--picture-card {
.hide /deep/ .el-upload--picture-card {
display: none;
display: none;
}
}
/* 购买限制 */
.purse_limit {
display: flex;
justify-content: flex-start;
.limit_radio {
// width: 70% !important;
margin-right: 0;
}
}
</
style
>
</
style
>
src/pages/Activity/releaseProduc/components/myMap.vue
View file @
c4ef5199
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
id=
"map"
class=
"mapContainer"
>
<div
id=
"map"
class=
"mapContainer"
>
<div
class=
"mapWrapper"
>
<div
class=
"mapWrapper"
>
<div
class=
"search"
>
<div
class=
"search"
>
<el-form
ref=
"form"
label-width=
"80px"
>
<el-form
ref=
"form"
label-width=
"80px"
@
submit
.
prevent
>
<el-form-item
label-position=
"left"
>
<el-form-item
label-position=
"left"
>
<el-button
@
click=
"handleSearch"
>
搜索
</el-button>
<el-button
@
click=
"handleSearch"
>
搜索
</el-button>
<el-input
<el-input
...
...
src/pages/Activity/releaseProduc/components/spellOrderSet.vue
View file @
c4ef5199
...
@@ -408,7 +408,7 @@ export default {
...
@@ -408,7 +408,7 @@ export default {
async
addPlace
()
{
async
addPlace
()
{
let
params
=
Object
.
assign
(
this
.
form
,
{
let
params
=
Object
.
assign
(
this
.
form
,
{
take_place_id
:
this
.
id
,
//搜索关键词
take_place_id
:
this
.
id
,
//搜索关键词
contact_name
:
this
.
form
.
contactor
contact_name
:
this
.
form
.
contactor
}
);
}
);
try
{
try
{
this
.
pageLoading
=
true
;
this
.
pageLoading
=
true
;
...
...
src/pages/Groupmeal/Distrib/index.vue
View file @
c4ef5199
...
@@ -9,47 +9,42 @@
...
@@ -9,47 +9,42 @@
>
添加配送员
</el-button
>
添加配送员
</el-button
>
>
</div>
</div>
<el-table
:data=
"distribList"
border
stripe
style=
"width: 100%"
>
<el-table
:data=
"distribList"
border
stripe
fit
style=
"width: 100%"
>
<el-table-column
<el-table-column
align=
"center"
prop=
"activeName"
label=
"活动名称"
>
align=
"center"
prop=
"activeName"
label=
"活动名称"
width=
"width"
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"配送员数量"
width=
"width"
>
<el-table-column
align=
"center"
label=
"配送员数量"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
{{
scope
.
row
.
list
.
length
}}
{{
scope
.
row
.
list
.
length
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
prop=
"deliverer_name"
label=
"配送人员"
>
align=
"center"
prop=
"deliverer_name"
label=
"配送人员"
width=
"width"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
list
.
map
(
item
=>
item
.
deliverer_name
).
join
(
"、"
)
}}
{{
scope
.
row
.
list
.
map
(
item
=>
item
.
deliverer_name
).
join
(
"、"
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"prop"
label=
"操作"
width=
"width"
align=
"center"
>
<el-table-column
prop=
"prop"
label=
"操作"
align=
"center"
min-width=
"100"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
@
click=
"handleModify(scope.row)"
<el-button
type=
"primary"
@
click=
"handleModify(scope.row)"
>
修改
</el-button
>
修改
</el-button
>
>
<el-button
<el-button
type=
"primary"
@
click=
"handleDownload(scope.row.url)"
type=
"primary"
v-show=
"scope.row.url"
@
click=
"handleDownload(scope.row.url)"
>
下载配送路线
</el-button
>
下载配送路线
</el-button
>
>
<el-button
type=
"primary"
@
click=
"handleDownload(scope.row.url)"
>
发送记录
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!-- 页码区 -->
<!-- 页码区 -->
<Pagination
<Pagination
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
v-model
:current-page=
"page"
:current-page=
"page"
:page-size=
"pageSize"
:page-size=
"pageSize"
:total=
"total"
:total=
"total"
></Pagination>
></Pagination>
...
@@ -237,7 +232,12 @@
...
@@ -237,7 +232,12 @@
cancelDialogMethodName=
"showEmailDialogCancel"
cancelDialogMethodName=
"showEmailDialogCancel"
@
showEmailDialogCancel=
"showEmailDialogCancel"
@
showEmailDialogCancel=
"showEmailDialogCancel"
>
>
<div
class=
"emailListContent"
>
<div
class=
"emailListContent"
v-loading=
"true"
element-loading-text=
"拼命加载中"
element-loading-spinner=
"el-icon-loading"
>
<el-table
:data=
"emailListTableData"
style=
"width: 100%"
>
<el-table
:data=
"emailListTableData"
style=
"width: 100%"
>
<el-table-column
prop=
"email"
label=
"接收邮箱"
width=
"180"
>
<el-table-column
prop=
"email"
label=
"接收邮箱"
width=
"180"
>
</el-table-column>
</el-table-column>
...
@@ -251,9 +251,11 @@
...
@@ -251,9 +251,11 @@
</template>
</template>
<
script
>
<
script
>
import
{
checkEmailName
}
from
"../../../utils/tools.js"
;
import
{
checkEmailName
}
from
"../../../utils/tools.js"
;
import
YDDialog
from
"
../../..
/components/Dialog/YDDialoag.vue"
;
import
YDDialog
from
"
@
/components/Dialog/YDDialoag.vue"
;
import
Layout
from
"../layout/index.vue"
;
import
Layout
from
"../layout/index.vue"
;
import
Pagination
from
"../components/Pagination/index.vue"
;
import
Pagination
from
"../components/Pagination/index.vue"
;
//import Pagination from "../components/Pagination/index.vue";
import
{
import
{
getDelivererList
,
getDelivererList
,
getList
,
getList
,
...
@@ -275,7 +277,7 @@ export default {
...
@@ -275,7 +277,7 @@ export default {
myEmialInput
:
""
,
// email地址
myEmialInput
:
""
,
// email地址
isEmailRequire
:
false
,
// 验证emial非空
isEmailRequire
:
false
,
// 验证emial非空
emialHasError
:
false
,
// 验证email格式
emialHasError
:
false
,
// 验证email格式
showEmailTableDialogVisible
:
tru
e
,
// 展示email发送情况的dialog
showEmailTableDialogVisible
:
fals
e
,
// 展示email发送情况的dialog
emailListTableData
:
[
emailListTableData
:
[
{
{
email
:
"2016-05-02"
,
email
:
"2016-05-02"
,
...
@@ -422,7 +424,6 @@ export default {
...
@@ -422,7 +424,6 @@ export default {
this
.
dialogFormAssign
=
true
;
this
.
dialogFormAssign
=
true
;
const
{
code
}
=
row
;
const
{
code
}
=
row
;
this
.
selectActivity
=
code
;
this
.
selectActivity
=
code
;
console
.
log
(
code
);
try
{
try
{
const
res
=
await
getDelivererList
({
code
});
const
res
=
await
getDelivererList
({
code
});
this
.
deliverer
=
res
.
response
;
this
.
deliverer
=
res
.
response
;
...
@@ -502,7 +503,6 @@ export default {
...
@@ -502,7 +503,6 @@ export default {
const
res
=
await
getDelivererList
();
const
res
=
await
getDelivererList
();
// this.deliverer.code = res.response.code;
// this.deliverer.code = res.response.code;
this
.
deliverer
=
res
.
response
;
this
.
deliverer
=
res
.
response
;
console
.
log
(
this
.
deliverer
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
}
}
...
...
src/pages/Groupmeal/components/Pagination/index.vue
View file @
c4ef5199
<
template
>
<
template
>
<div
class=
"block"
>
<div
class=
"block"
>
<el-pagination
<el-pagination
class=
"pagination"
class=
"pagination"
layout=
"prev, pager, next, jumper, ->,page , total"
layout=
"prev, pager, next, jumper, ->,page , total"
v-bind=
"$attrs"
v-bind=
"$attrs"
v-on=
"$listener"
>
>
</el-pagination>
</el-pagination>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'Pagination'
name
:
"Pagination"
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.block {
.block {
margin-top: 50px;
margin-top: 50px;
}
}
...
...
src/pages/Life-no/index.vue
View file @
c4ef5199
<
template
>
<
template
>
<layout>
<layout>
<div
class=
"life-no"
>
<div
class=
"life-no"
>
<el-form
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form-item
label=
"生活号名称"
>
<el-form-item
label=
"生活号名称"
>
<el-input
<el-input
class=
"search_life"
class=
"search_life"
...
@@ -17,81 +12,47 @@
...
@@ -17,81 +12,47 @@
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-form-item
label=
"类型"
>
<el-select
<el-select
v-model=
"life_account.type"
placeholder=
"类型"
>
v-model=
"life_account.type"
<el-option
value=
"0"
label=
"全部"
></el-option>
placeholder=
"类型"
<el-option
value=
"1"
label=
"个人"
></el-option>
>
<el-option
value=
"2"
label=
"企业"
></el-option>
<el-option
value=
"0"
label=
"全部"
></el-option>
<el-option
value=
"1"
label=
"个人"
></el-option>
<el-option
value=
"2"
label=
"企业"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
@
click=
"onSearchSubmit"
>
查询
</el-button>
type=
"primary"
@
click=
"onSearchSubmit"
>
查询
</el-button>
<el-button
@
click=
"onReset"
>
重置
</el-button>
<el-button
@
click=
"onReset"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
:data=
"LifeNoList"
border
style=
"width: 100%"
>
:data=
"LifeNoList"
<el-table-column
prop=
"life_account_id"
label=
"ID"
>
</el-table-column>
border
<el-table-column
prop=
"life_account_name"
label=
"生活号名称"
>
style=
"width: 100%"
>
<el-table-column
prop=
"life_account_id"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"life_account_name"
label=
"生活号名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
:formatter=
"hasTypeFormat"
label=
"类型"
>
:formatter=
"hasTypeFormat"
label=
"类型"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
:formatter=
"hasStatusFormat"
label=
"状态"
>
:formatter=
"hasStatusFormat"
label=
"状态"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"create_time"
label=
"创建时间"
>
</el-table-column>
prop=
"create_time"
label=
"创建时间"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"primary"
type=
"primary"
@
click
.
stop=
"toLifeDetail(scope.row)"
@
click
.
stop=
"toLifeDetail(scope.row)"
>
查看详情
</el-button>
>
查看详情
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
:totalNum=
"totalNum"
@
update=
"update"
/>
</div>
</div>
</layout>
</layout>
</template>
</template>
<
script
>
<
script
>
import
Layout
from
'@/layouts'
import
Layout
from
"@/layouts"
;
import
page
from
"../components/Pagination"
// import page from "../components/Pagination";
import
page
from
"../components/Pagination.vue"
;
import
{
getLifeNoList
as
reqGetLifeNoList
}
from
"../../service/life-no"
;
import
{
getLifeNoList
as
reqGetLifeNoList
}
from
"../../service/life-no"
;
export
default
{
export
default
{
name
:
"LifeNo"
,
name
:
"LifeNo"
,
...
@@ -99,7 +60,7 @@ export default {
...
@@ -99,7 +60,7 @@ export default {
Layout
,
Layout
,
page
page
},
},
data
()
{
data
()
{
return
{
return
{
params
:
{
params
:
{
page
:
1
,
page
:
1
,
...
@@ -107,25 +68,25 @@ export default {
...
@@ -107,25 +68,25 @@ export default {
},
},
life_account
:
{
life_account
:
{
name
:
""
,
name
:
""
,
type
:
""
,
type
:
""
},
},
totalNum
:
null
,
totalNum
:
null
,
lifeList
:
[],
lifeList
:
[],
LifeNoList
:
[],
LifeNoList
:
[],
formInline
:
{
formInline
:
{
user
:
''
,
user
:
""
,
region
:
''
region
:
""
}
}
}
}
;
},
},
created
()
{
created
()
{
this
.
getLifeNoListFn
()
this
.
getLifeNoListFn
()
;
},
},
methods
:
{
methods
:
{
hasTypeFormat
(
row
)
{
hasTypeFormat
(
row
)
{
return
row
.
life_account_type
==
1
?
'个人'
:
'企业'
return
row
.
life_account_type
==
1
?
"个人"
:
"企业"
;
},
},
hasStatusFormat
(
row
)
{
hasStatusFormat
(
row
)
{
if
(
row
.
life_account_status
==
1
)
{
if
(
row
.
life_account_status
==
1
)
{
return
"正常"
;
return
"正常"
;
}
else
if
(
row
.
life_account_status
==
3
)
{
}
else
if
(
row
.
life_account_status
==
3
)
{
...
@@ -135,39 +96,41 @@ export default {
...
@@ -135,39 +96,41 @@ export default {
}
}
},
},
//获取列表数据
//获取列表数据
getLifeNoListFn
()
{
getLifeNoListFn
()
{
let
{
name
,
type
}
=
this
.
life_account
let
{
name
,
type
}
=
this
.
life_account
;
let
{
page
,
page_size
}
=
this
.
params
let
{
page
,
page_size
}
=
this
.
params
;
let
params
=
{
let
params
=
{
page
,
page
,
page_size
,
page_size
,
life_account_name
:
name
,
life_account_name
:
name
,
life_account_type
:
type
life_account_type
:
type
}
}
;
reqGetLifeNoList
(
params
).
then
(
res
=>
{
reqGetLifeNoList
(
params
).
then
(
res
=>
{
this
.
totalNum
=
res
.
count
this
.
totalNum
=
res
.
count
;
this
.
LifeNoList
=
res
.
data
this
.
LifeNoList
=
res
.
data
;
})
})
;
},
},
//查询
//查询
onSearchSubmit
()
{
onSearchSubmit
()
{
this
.
getLifeNoListFn
()
this
.
getLifeNoListFn
()
;
},
},
//重置
//重置
onReset
()
{
onReset
()
{
this
.
life_account
.
name
=
""
,
(
this
.
life_account
.
name
=
""
),
(
this
.
life_account
.
type
=
""
);
this
.
life_account
.
type
=
""
this
.
getLifeNoListFn
();
this
.
getLifeNoListFn
()
},
},
update
(
obj
)
{
update
(
obj
)
{
Object
.
assign
(
this
.
params
,
obj
)
Object
.
assign
(
this
.
params
,
obj
);
this
.
getLifeNoListFn
(
this
.
params
)
this
.
getLifeNoListFn
(
this
.
params
);
},
toLifeDetail
(
row
)
{
this
.
$router
.
push
({
name
:
'LifeNoDetail'
,
query
:
{
lifeId
:
row
.
life_account_id
}
});
},
},
toLifeDetail
(
row
)
{
this
.
$router
.
push
({
name
:
"LifeNoDetail"
,
query
:
{
lifeId
:
row
.
life_account_id
}
});
}
}
}
}
}
;
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.life-no {
.life-no {
...
...
src/pages/components/Pagination.vue
View file @
c4ef5199
...
@@ -14,27 +14,27 @@
...
@@ -14,27 +14,27 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'totalNum'
],
props
:
[
"totalNum"
],
data
()
{
data
()
{
return
{
return
{
currentPage
:
1
,
currentPage
:
1
,
page_size
:
20
page_size
:
20
}
}
;
},
},
methods
:
{
methods
:
{
handleSizeChange
(
size
)
{
handleSizeChange
(
size
)
{
console
.
log
(
`每页
${
size
}
条`
);
console
.
log
(
`每页
${
size
}
条`
);
this
.
$emit
(
'update'
,
{
page_size
:
size
})
this
.
$emit
(
"update"
,
{
page_size
:
size
});
},
},
handleCurrentChange
(
pageIndex
)
{
handleCurrentChange
(
pageIndex
)
{
console
.
log
(
`当前页:
${
pageIndex
}
`
);
console
.
log
(
`当前页:
${
pageIndex
}
`
);
this
.
$emit
(
'update'
,
{
page
:
pageIndex
})
this
.
$emit
(
"update"
,
{
page
:
pageIndex
});
}
}
}
,
}
}
}
;
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.block {
.block {
margin-top: 50px;
margin-top: 50px;
}
}
</
style
>
</
style
>
\ No newline at end of file
vue.config.js
View file @
c4ef5199
...
@@ -5,12 +5,20 @@ const isDev = process.env.NODE_ENV === "development";
...
@@ -5,12 +5,20 @@ const isDev = process.env.NODE_ENV === "development";
module
.
exports
=
{
module
.
exports
=
{
outputDir
:
isDev
?
"./dist"
:
path
.
resolve
(
"./public/dist/"
),
outputDir
:
isDev
?
"./dist"
:
path
.
resolve
(
"./public/dist/"
),
publicPath
:
isDev
?
"/"
:
"/dist"
,
publicPath
:
isDev
?
"/"
:
"/dist"
,
configureWebpack
:
{
configureWebpack
:
()
=>
{
devServer
:
{
// Object.assign(config, {
proxy
:
"http://127.0.0.1:8055"
,
//http://localhost:8055
// // 开发生产共同配置
hot
:
true
,
// resolve: {
disableHostCheck
:
true
// alias: {
}
// "@": path.resolve(__dirname, "./src"),
// "@components": path.resolve(__dirname, "./src/components"),
// "@utils": path.resolve(__dirname, "./src/utils"),
// "@pages": path.resolve(__dirname, "./src/pages"),
// "@router": path.resolve(__dirname, "./src/router"),
// "@assets": path.resolve(__dirname, "./src/assets")
// }
// }
// });
},
},
chainWebpack
:
config
=>
{
chainWebpack
:
config
=>
{
// 默认不开启 prefetch
// 默认不开启 prefetch
...
@@ -24,5 +32,10 @@ module.exports = {
...
@@ -24,5 +32,10 @@ module.exports = {
args
[
0
].
title
=
"运营管理系统"
;
args
[
0
].
title
=
"运营管理系统"
;
return
args
;
return
args
;
});
});
},
devServer
:
{
proxy
:
"http://127.0.0.1:8055"
,
//http://localhost:8055
hot
:
true
,
disableHostCheck
:
true
}
}
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment