Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-purchase
Project
Project
Details
Activity
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
张冬
web-purchase
Commits
3e794727
Commit
3e794727
authored
Sep 24, 2020
by
张冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加注册输入限制,替换请求路径
parent
8141d33d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
357 additions
and
266 deletions
+357
-266
demand.vue
src/pages/purchaser/bid/releaseProject/demand.vue
+321
-249
message.vue
src/pages/purchaser/bid/releaseProject/message.vue
+33
-14
releaseProject.vue
src/pages/purchaser/bid/releaseProject/releaseProject.vue
+1
-1
request.js
src/utils/request.js
+2
-2
No files found.
src/pages/purchaser/bid/releaseProject/demand.vue
View file @
3e794727
<
template
>
<div>
<div
class=
"describe"
>
标的需求
</div>
<div
class=
"padding"
>
<div
class=
"buttons"
>
<el-button
@
click=
"add"
>
添加
</el-button>
<el-button
>
删除
</el-button>
</div>
<dataTable
:table-data=
"tableData"
:columns=
"columns"
:is-pageobj=
"false"
@
sendSelection=
"getSelection"
>
<el-table-column
slot=
"operate"
label=
"操作"
align=
"center"
fixed=
"right"
width=
"100"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"small"
@
click=
"examine(scope.row,scope.$index)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</dataTable>
<el-dialog
:visible
.
sync=
"dialogVisible"
title=
"添加标的"
width=
"50%"
>
<!-- <dataForm
<div>
<div
class=
"describe"
>
标的需求
</div>
<div
class=
"padding"
>
<div
class=
"buttons"
>
<el-button
@
click=
"add"
>
添加
</el-button>
<el-button
@
click=
"delAllSelection"
>
删除
</el-button>
</div>
<dataTable
:table-data=
"tableData"
:columns=
"columns"
:is-pageobj=
"false"
@
sendSelection=
"getSelection"
>
<el-table-column
slot=
"operate"
label=
"操作"
align=
"center"
fixed=
"right"
width=
"100"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"small"
@
click=
"examine(scope.row,scope.$index)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</dataTable>
<el-dialog
:visible
.
sync=
"dialogVisible"
title=
"添加标的"
width=
"50%"
>
<!-- <dataForm
ref="dataform"
:search-form="searchForm"
:search-data="searchData"
...
...
@@ -23,243 +23,315 @@
:is-inline="true"
:is-handle="false"
label-width="200px"></dataForm> -->
<el-form
:model=
"searchData"
:rules=
"rules"
ref=
"searchData"
label-width=
"100px"
>
<el-form-item
label=
"标的编码:"
prop=
"encoding"
>
<el-input
v-model
.
trim=
"searchData.encoding"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"标的名称:"
prop=
"bidName"
>
<el-input
v-model
.
trim=
"searchData.bidName"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"数量:"
prop=
"quantity"
>
<el-input
v-model
.
trim=
"searchData.quantity"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"计量单位:"
prop=
"unit"
>
<el-input
v-model
.
trim=
"searchData.unit"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"品牌:"
prop=
"brand"
>
<el-input
v-model
.
trim=
"searchData.brand"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"规格型号:"
prop=
"specification"
>
<el-input
v-model
.
trim=
"searchData.specification"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"标杆价(元):"
prop=
"price"
>
<el-input
v-model
.
trim=
"searchData.price"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"备注:"
prop=
"remark"
>
<el-input
v-model
.
trim=
"searchData.remark"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sure"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
<div
class=
"button"
>
<el-button
@
click=
"upper"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"next"
>
下一步
</el-button>
</div>
</div>
<el-form
:model=
"searchData"
:rules=
"rules"
ref=
"searchData"
label-width=
"150px"
>
<el-form-item
label=
"标的编码:"
prop=
"encoding"
>
<el-input
v-model
.
trim=
"searchData.encoding"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"标的名称:"
prop=
"bidName"
>
<el-input
v-model
.
trim=
"searchData.bidName"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"数量:"
prop=
"quantity"
>
<el-input
v-model
.
trim=
"searchData.quantity"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"计量单位:"
prop=
"unit"
>
<el-input
v-model
.
trim=
"searchData.unit"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"品牌:"
prop=
"brand"
>
<el-input
v-model
.
trim=
"searchData.brand"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"规格型号:"
prop=
"specification"
>
<el-input
v-model
.
trim=
"searchData.specification"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"标杆价(元):"
prop=
"price"
>
<el-input
v-model
.
trim=
"searchData.price"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"备注:"
prop=
"remark"
>
<el-input
v-model
.
trim=
"searchData.remark"
placeholder=
'请输入'
maxlength=
"30"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sure"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
<div
class=
"button"
>
<el-button
@
click=
"upper"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"next"
>
下一步
</el-button>
</div>
</div>
</template>
<
script
>
import
dataTable
from
'@components/nopageTable.vue'
import
dataForm
from
'@components/dataForm.vue'
export
default
{
components
:
{
dataTable
,
dataForm
},
data
()
{
return
{
// searchForm: [{
// type: 'input',
// label: '标的编码:',
// prop: 'encoding',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '标的名称:',
// prop: 'bidName',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '数量:',
// prop: 'quantity',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '计量单位:',
// prop: 'unit',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '品牌:',
// prop: 'brand',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '规格型号:',
// prop: 'specification',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '标杆价(元):',
// prop: 'price',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '备注:',
// prop: 'remark',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// }
// ],
// 表单验证
rules
:
{
bidName
:
[{
requied
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
encoding
:[{
requied
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}]
},
projectCommodityList
:[],
dialogVisible
:
false
,
searchData
:
{
encoding
:
''
,
bidName
:
''
,
quantity
:
''
,
unit
:
''
,
brand
:
''
,
specification
:
''
,
price
:
''
,
remark
:
""
},
tableData
:
[],
columns
:
[{
selection
:
true
},
{
label
:
'标的编码'
,
prop
:
'encoding'
},
{
label
:
'标的名称'
,
prop
:
'bidName'
},
{
label
:
'数量'
,
prop
:
'quantity'
},
{
label
:
'计量单位'
,
prop
:
'unit'
},
{
label
:
'品牌'
,
prop
:
'brand'
},
{
label
:
'规格型号'
,
prop
:
'specification'
},
{
label
:
'标杆价(元)'
,
prop
:
'price'
},
{
label
:
'备注'
,
prop
:
'remark'
},
{
slot
:
'operate'
}
],
// 操作列
import
dataTable
from
'@components/nopageTable.vue'
import
dataForm
from
'@components/dataForm.vue'
export
default
{
components
:
{
dataTable
,
dataForm
},
data
()
{
return
{
// searchForm: [{
// type: 'input',
// label: '标的编码:',
// prop: 'encoding',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '标的名称:',
// prop: 'bidName',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '数量:',
// prop: 'quantity',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '计量单位:',
// prop: 'unit',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '品牌:',
// prop: 'brand',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '规格型号:',
// prop: 'specification',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '标杆价(元):',
// prop: 'price',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '备注:',
// prop: 'remark',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// }
// ],
// 表单验证
rules
:
{
encoding
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
bidName
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
quantity
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
unit
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
brand
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
specification
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
price
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
remark
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
},
multipleSelection
:
[],
dialogVisible
:
false
,
searchData
:
{
encoding
:
''
,
bidName
:
''
,
quantity
:
''
,
unit
:
''
,
brand
:
''
,
specification
:
''
,
price
:
''
,
remark
:
""
},
tableData
:
[],
columns
:
[{
selection
:
true
},
{
label
:
'标的编码'
,
prop
:
'encoding'
},
{
label
:
'标的名称'
,
prop
:
'bidName'
},
{
label
:
'数量'
,
prop
:
'quantity'
},
{
label
:
'计量单位'
,
prop
:
'unit'
},
{
label
:
'品牌'
,
prop
:
'brand'
},
{
label
:
'规格型号'
,
prop
:
'specification'
},
{
label
:
'标杆价(元)'
,
prop
:
'price'
},
{
label
:
'备注'
,
prop
:
'remark'
},
{
slot
:
'operate'
}
],
// 操作列
pageObj
:
{
size
:
10
,
total
:
1
,
currentPage
:
1
,
sizes
:
[
100
,
200
,
300
],
func
:
(
currentPage
)
=>
{
this
.
pageTurning
(
currentPage
)
}
},
type
:
''
,
idx
:
''
}
},
methods
:
{
sure
()
{
let
type
=
this
.
type
if
(
type
===
0
)
{
this
.
tableData
.
push
(
this
.
searchData
)
}
else
{
this
.
$set
(
this
.
tableData
,
this
.
idx
,
this
.
searchData
)
}
this
.
dialogVisible
=
false
},
examine
(
row
,
index
)
{
this
.
type
=
1
this
.
idx
=
index
this
.
searchData
=
Object
.
assign
({},
row
)
this
.
dialogVisible
=
true
},
add
()
{
this
.
type
=
0
this
.
dialogVisible
=
true
const
searchData
=
{
encoding
:
''
,
bidName
:
''
,
quantity
:
''
,
unit
:
''
,
brand
:
''
,
specification
:
''
,
price
:
''
,
remark
:
""
}
this
.
searchData
=
searchData
},
// 获取邀请的供应商列表
getSelection
(
val
)
{
this
.
projectCommodityList
=
val
;
console
.
log
(
this
.
projectCommodityList
)
},
next
()
{
let
projectCommodityList
=
this
.
projectCommodityList
;
if
(
projectCommodityList
.
length
>
0
){
let
ruleForm
=
{};
ruleForm
.
projectCommodityList
=
projectCommodityList
;
this
.
$emit
(
'getruleForm'
,
ruleForm
)
this
.
$parent
.
next
()
}
else
{
this
.
$message
.
error
(
'请添加标的需求'
);
pageObj
:
{
size
:
10
,
total
:
1
,
currentPage
:
1
,
sizes
:
[
100
,
200
,
300
],
func
:
(
currentPage
)
=>
{
this
.
pageTurning
(
currentPage
)
}
},
type
:
''
,
idx
:
''
}
},
methods
:
{
// 删除操作
handleDelete
(
row
,
index
)
{
// 二次确认删除
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
type
:
'warning'
})
.
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
tableData
.
splice
(
index
,
1
)
})
.
catch
(()
=>
{})
},
getSelection
(
val
)
{
console
.
log
(
val
)
this
.
multipleSelection
=
val
},
// 删除操作
delAllSelection
()
{
let
val
=
this
.
multipleSelection
if
(
val
.
length
>
0
)
{
console
.
log
(
val
);
val
.
forEach
((
va
,
index
)
=>
{
this
.
tableData
.
forEach
((
v
,
i
)
=>
{
if
(
va
.
bidName
===
v
.
bidName
)
{
this
.
tableData
.
splice
(
i
,
1
)
}
})
})
this
.
$message
.
success
(
"删除成功"
);
this
.
multipleSelection
=
[];
}
else
{
this
.
$message
.
error
(
"没有选择删除的项"
);
}
},
// 确认添加需求
async
sure
()
{
const
valid
=
await
this
.
$refs
[
'searchData'
].
validate
();
console
.
log
(
valid
)
if
(
valid
)
{
let
type
=
this
.
type
if
(
type
===
0
)
{
this
.
tableData
.
push
(
this
.
searchData
)
}
else
{
this
.
$set
(
this
.
tableData
,
this
.
idx
,
this
.
searchData
)
}
this
.
dialogVisible
=
false
}
},
examine
(
row
,
index
)
{
this
.
type
=
1
this
.
idx
=
index
this
.
searchData
=
Object
.
assign
({},
row
)
this
.
dialogVisible
=
true
},
add
()
{
this
.
type
=
0
this
.
dialogVisible
=
true
const
searchData
=
{
encoding
:
''
,
bidName
:
''
,
quantity
:
''
,
unit
:
''
,
brand
:
''
,
specification
:
''
,
price
:
''
,
remark
:
""
}
this
.
searchData
=
searchData
},
next
()
{
let
projectCommodityList
=
this
.
tableData
;
if
(
projectCommodityList
.
length
>
0
)
{
let
ruleForm
=
{};
ruleForm
.
projectCommodityList
=
projectCommodityList
;
this
.
$emit
(
'getruleForm'
,
ruleForm
)
this
.
$parent
.
next
()
}
else
{
this
.
$message
.
error
(
'请添加标的需求'
);
}
},
upper
()
{
this
.
$parent
.
upper
()
}
}
},
upper
()
{
this
.
$parent
.
upper
()
}
}
}
}
</
script
>
<
style
scoped
>
...
...
src/pages/purchaser/bid/releaseProject/message.vue
View file @
3e794727
...
...
@@ -54,7 +54,7 @@
<el-input
v-model
.
trim=
"ruleForm.contactsWay"
placeholder=
"请输入"
maxlength=
"30"
></el-input>
</el-form-item>
</div>
</el-form>
</el-form>
</div>
</div>
<div>
...
...
@@ -234,6 +234,18 @@ export default {
dataTableList
},
data
()
{
let
checkPhone
=
async
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'手机号不能为空'
));
}
else
{
const
reg
=
/^1
[
3|4|5|7|8
][
0-9
]\d{8}
$/
if
(
reg
.
test
(
value
))
{
callback
();
}
else
{
return
callback
(
new
Error
(
'请输入正确的手机号'
));
}
}
};
let
isMin
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
callback
(
new
Error
(
'请输入'
))
...
...
@@ -341,8 +353,8 @@ export default {
trigger
:
'blur'
}],
phone
:
[{
required
:
true
,
message
:
'请输入'
,
required
:
true
,
validator
:
checkPhone
,
trigger
:
'blur'
}],
money
:
[{
...
...
@@ -402,7 +414,7 @@ export default {
}],
contactsWay
:
[{
required
:
true
,
message
:
'请选择'
,
validator
:
checkPhone
,
trigger
:
'blur'
}]
},
...
...
@@ -480,26 +492,33 @@ export default {
// 删除操作
delAllSelection
()
{
let
val
=
this
.
multipleSelection
val
.
forEach
((
va
,
index
)
=>
{
this
.
ruleForm
.
companyVOList
.
forEach
((
v
,
i
)
=>
{
if
(
va
.
id
===
v
.
id
)
{
this
.
ruleForm
.
companyVOList
.
splice
(
i
,
1
)
}
})
})
this
.
$message
.
error
(
"删除成功"
);
this
.
multipleSelection
=
[];
if
(
val
.
length
>
0
){
val
.
forEach
((
va
,
index
)
=>
{
this
.
ruleForm
.
companyVOList
.
forEach
((
v
,
i
)
=>
{
if
(
va
.
id
===
v
.
id
)
{
this
.
ruleForm
.
companyVOList
.
splice
(
i
,
1
)
}
})
})
this
.
$message
.
success
(
"删除成功"
);
this
.
multipleSelection
=
[];
}
else
{
this
.
$message
.
error
(
"没有选择删除的项"
);
}
},
// 到下一步
async
next
()
{
const
valid
=
await
this
.
$refs
[
'ruleForm'
].
validate
()
const
valid1
=
await
this
.
$refs
[
'bidBookInfoPO'
].
validate
()
let
valid2
=
""
if
(
this
.
ruleForm
.
isNeedEarnest
)
{
const
valid2
=
await
this
.
$refs
[
'earnestInfoPO'
].
validate
()
valid2
=
await
this
.
$refs
[
'earnestInfoPO'
].
validate
()
console
.
log
(
valid2
)
}
const
valid3
=
await
this
.
$refs
[
'contentForm'
].
validate
()
let
isNext
=
''
if
(
this
.
ruleForm
.
isNeedEarnest
)
{
console
.
log
(
valid2
)
isNext
=
valid
&&
valid1
&&
valid2
&&
valid3
}
else
{
isNext
=
valid
&&
valid1
&&
valid3
...
...
src/pages/purchaser/bid/releaseProject/releaseProject.vue
View file @
3e794727
...
...
@@ -56,7 +56,7 @@ export default {
},
data
()
{
return
{
activeIdx
:
1
,
activeIdx
:
0
,
allForm
:
{}
}
},
...
...
src/utils/request.js
View file @
3e794727
...
...
@@ -5,8 +5,8 @@ import { Message, MessageBox } from 'element-ui'
// 创建axios实例
const
service
=
axios
.
create
({
//
baseURL: 'http://192.168.200.201:8082/apis',
baseURL
:
'http://192.168.3.35:8085/apis'
,
baseURL
:
'http://192.168.200.201:8082/apis'
,
//
baseURL: 'http://192.168.3.35:8085/apis',
timeout
:
35000
// 请求超时时间
})
...
...
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