Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-ui
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
pda
pda-ui
Commits
c88706df
Commit
c88706df
authored
Jan 24, 2024
by
hiyonx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工厂报价模块
parent
e9846913
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
402 additions
and
1 deletion
+402
-1
factoryQuote.js
src/api/mes/qt/factoryQuote.js
+44
-0
index.vue
src/components/SapPropertyData/index.vue
+1
-1
index.vue
src/views/mes/qt/factoryQuote/index.vue
+357
-0
No files found.
src/api/mes/qt/factoryQuote.js
0 → 100644
View file @
c88706df
import
request
from
'@/utils/request'
// 查询工厂报价列表
export
function
listFactoryQuote
(
query
)
{
return
request
({
url
:
'/qt/factoryQuote/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询工厂报价详细
export
function
getFactoryQuote
(
id
)
{
return
request
({
url
:
'/qt/factoryQuote/'
+
id
,
method
:
'get'
})
}
// 新增工厂报价
export
function
addFactoryQuote
(
data
)
{
return
request
({
url
:
'/qt/factoryQuote'
,
method
:
'post'
,
data
:
data
})
}
// 修改工厂报价
export
function
updateFactoryQuote
(
data
)
{
return
request
({
url
:
'/qt/factoryQuote'
,
method
:
'put'
,
data
:
data
})
}
// 删除工厂报价
export
function
delFactoryQuote
(
id
)
{
return
request
({
url
:
'/qt/factoryQuote/'
+
id
,
method
:
'delete'
})
}
src/components/SapPropertyData/index.vue
View file @
c88706df
...
...
@@ -8,7 +8,7 @@
<template
v-for=
"item in sapProperties"
>
<el-col
:span=
"span"
:key=
"item.id"
>
<el-form-item
:label=
"item.name"
:prop=
"key + '.' + item.sapField"
:rules=
"
{required: item.required, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['change']}
">
:rules=
"
item.required ?
{required: item.required, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['change']} : null
">
<el-input-all
v-model=
"sapData[key][item.sapField]"
:item=
"item"
/>
</el-form-item>
</el-col>
...
...
src/views/mes/qt/factoryQuote/index.vue
0 → 100644
View file @
c88706df
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"客户名称"
prop=
"clientId"
>
<el-select
v-model=
"queryParams.clientId"
placeholder=
"请选择 客户"
clearable
filterable
remote
:remote-method=
"getClientList"
>
<el-option
v-for=
"item in clientList"
:key=
"item.clientId"
:value=
"item.clientId"
:label=
"item.clientName"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"产品"
prop=
"itemId"
>
<el-select
v-model=
"queryParams.itemId"
placeholder=
"产品名称"
clearable
filterable
remote
:remote-method=
"getItemList"
>
<el-option
v-for=
"item in itemList"
:key=
"item.itemId"
:value=
"item.itemId"
:label=
"item.itemName"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"有效期起"
prop=
"validFrom"
>
<el-date-picker
clearable
v-model=
"queryParams.validFrom"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择有效期起"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"有效期至"
prop=
"validTo"
>
<el-date-picker
clearable
v-model=
"queryParams.validTo"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择有效期至"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"state"
>
<el-input
v-model=
"queryParams.state"
placeholder=
"请输入状态: 0草稿, 1审批中, 2发布中, 3确认"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['qt:factoryQuote:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['qt:factoryQuote:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['qt:factoryQuote:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['qt:factoryQuote:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"factoryQuoteList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
label=
"客户编号"
prop=
"clientCode"
/>
<el-table-column
label=
"客户名称"
prop=
"clientName"
/>
<el-table-column
label=
"产品编号"
prop=
"itemCode"
/>
<el-table-column
label=
"产品名称"
prop=
"itemName"
/>
<el-table-column
label=
"价格"
prop=
"price"
/>
<el-table-column
label=
"有效期起"
prop=
"validFrom"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
validFrom
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"有效期至"
prop
=
"validTo"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
validTo
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"状态"
prop
=
"state"
/>
<
el
-
table
-
column
label
=
"操作"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['qt:factoryQuote:edit']"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['qt:factoryQuote:remove']"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改工厂报价对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"客户名称"
prop
=
"clientId"
>
<
el
-
select
v
-
model
=
"form.clientId"
placeholder
=
"请选择 客户"
clearable
filterable
remote
:
remote
-
method
=
"getClientList"
>
<
el
-
option
v
-
for
=
"item in clientList"
:
key
=
"item.clientId"
:
value
=
"item.clientId"
:
label
=
"item.clientName"
/>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"产品"
prop
=
"itemId"
>
<
el
-
input
v
-
model
=
"form.itemName"
readonly
placeholder
=
"请选择产品"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"$refs['ItemSelectRef'].showFlag = true"
><
/el-button
>
<
/el-input
>
<
ItemSelect
ref
=
"ItemSelectRef"
@
onSelected
=
"onItemSelect"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"价格"
prop
=
"price"
>
<
el
-
input
v
-
model
=
"form.price"
placeholder
=
"请输入价格"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"有效期起"
prop
=
"validFrom"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.validFrom"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择有效期起"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"有效期至"
prop
=
"validTo"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.validTo"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择有效期至"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"状态"
prop
=
"state"
>
<
el
-
input
v
-
model
=
"form.state"
placeholder
=
"请输入状态"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
addFactoryQuote
,
delFactoryQuote
,
getFactoryQuote
,
listFactoryQuote
,
updateFactoryQuote
}
from
'@/api/mes/qt/factoryQuote'
import
{
listClient
}
from
'@/api/mes/md/client'
import
{
listMdItem
}
from
'@/api/mes/md/mdItem'
import
ItemSelect
from
'@/components/itemSelect/single.vue'
export
default
{
name
:
'FactoryQuote'
,
components
:
{
ItemSelect
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 工厂报价表格数据
factoryQuoteList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
clientId
:
null
,
itemId
:
null
,
price
:
null
,
validFrom
:
null
,
validTo
:
null
,
state
:
null
}
,
// 表单参数
form
:
{
id
:
null
,
itemId
:
null
,
itemName
:
null
,
clientId
:
null
,
price
:
null
,
validFrom
:
null
,
validTo
:
null
,
state
:
null
}
,
// 表单校验
rules
:
{
}
,
clientList
:
[],
itemList
:
[],
}
}
,
created
()
{
this
.
getList
()
this
.
getClientList
()
this
.
getItemList
()
}
,
methods
:
{
/** 查询工厂报价列表 */
getList
()
{
this
.
loading
=
true
listFactoryQuote
(
this
.
queryParams
).
then
(
response
=>
{
this
.
factoryQuoteList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
)
}
,
getClientList
(
clientName
)
{
listClient
({
clientName
,
pageNum
:
1
,
pageSize
:
100
}
).
then
(
res
=>
this
.
clientList
=
res
.
rows
)
}
,
getItemList
(
itemName
)
{
listMdItem
({
itemName
,
pageNum
:
1
,
pageSize
:
100
}
).
then
(
res
=>
{
this
.
itemList
=
res
.
rows
;
}
)
}
,
onItemSelect
(
row
)
{
console
.
log
(
row
)
if
(
row
!=
undefined
)
{
this
.
form
.
itemId
=
row
.
itemId
;
this
.
form
.
itemName
=
row
.
itemName
;
this
.
$forceUpdate
()
}
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
}
,
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
clientId
:
null
,
itemId
:
null
,
price
:
null
,
validFrom
:
null
,
validTo
:
null
,
state
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
}
this
.
resetForm
(
'form'
)
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
()
this
.
open
=
true
this
.
title
=
'添加工厂报价'
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
()
const
id
=
row
.
id
||
this
.
ids
getFactoryQuote
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
open
=
true
this
.
title
=
'修改工厂报价'
}
)
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateFactoryQuote
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'修改成功'
)
this
.
open
=
false
this
.
getList
()
}
)
}
else
{
addFactoryQuote
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
this
.
getList
()
}
)
}
}
}
)
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
this
.
$modal
.
confirm
(
'是否确认删除工厂报价编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
return
delFactoryQuote
(
ids
)
}
).
then
(()
=>
{
this
.
getList
()
this
.
$modal
.
msgSuccess
(
'删除成功'
)
}
).
catch
(()
=>
{
}
)
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'qt/factoryQuote/export'
,
{
...
this
.
queryParams
}
,
`factoryQuote_${new Date().getTime()
}
.xlsx`
)
}
}
}
<
/script
>
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