Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
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
wangweidong
patzn-cloud-web-back-soil
Commits
d366e8bb
Commit
d366e8bb
authored
Jun 13, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
委托单优化
parent
9748869e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
20 deletions
+39
-20
meter-sample.js
api/meter/meter-sample.js
+13
-1
MeterOutTaskAlloca.vue
pages/meter-out/task-distribute/MeterOutTaskAlloca.vue
+26
-19
No files found.
api/meter/meter-sample.js
View file @
d366e8bb
...
...
@@ -22,5 +22,17 @@ export default {
.
then
(
res
=>
res
),
subpackageSample
:
data
=>
http
.
post
(
'meter/v1/sample/subpackage_sample?ids='
+
data
).
then
(
res
=>
res
)
http
.
post
(
'meter/v1/sample/subpackage_sample?ids='
+
data
).
then
(
res
=>
res
),
distributeOutSample
:
data
=>
http
.
post
(
'meter/v1/sample/out_task_distribute?ids='
+
data
.
ids
+
'&userId='
+
data
.
userId
+
'&user='
+
data
.
user
)
.
then
(
res
=>
res
)
}
pages/meter-out/task-distribute/MeterOutTaskAlloca.vue
View file @
d366e8bb
...
...
@@ -10,24 +10,24 @@
<Form
id=
"formId"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"样品名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品名称"
clearable
/>
<Input
v-model=
"formObj.name"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
label=
"样品编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.code"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品编号"
clearable
/>
<Input
v-model=
"formObj.code"
placeholder=
"请输入样品编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
style=
"margin-left: -10px"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
class=
"contHide
"
></btn-list>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
:icon-msg=
"iconMsg"
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
...
...
@@ -57,12 +57,11 @@
</Row>
</div>
</Modal>
<assignPerson
ref=
"userModal"
@
on-result-change=
"_userData"
is-change
></assignPerson>
<assignPerson
ref=
"userModal"
is-change
@
on-result-change=
"_userData"
></assignPerson>
</div>
</template>
<
script
>
import
{
meterSample
}
from
'../../../api'
import
Global
from
'../../../api/config'
import
assignPerson
from
'../../../components/user-info-single/assignPerson'
export
default
{
components
:
{
...
...
@@ -179,23 +178,31 @@ export default {
}
})
},
_userData
(
data
,
msg
,
contractTempData
)
{
_userData
(
data
,
msg
)
{
if
(
msg
===
'salesman'
)
{
// this.salesman = data.realname
// this.formObj.detail.salesmanId = data.userId
// this.formObj.detail.salesmanPhone = data.mobile
console
.
log
(
'选择人员返回值'
)
console
.
log
(
data
)
this
.
_distributeSample
(
data
)
}
},
_distributeSample
:
async
function
(
data
)
{
const
userId
=
data
.
id
const
realname
=
data
.
realname
const
ids
=
this
.
selectIds
const
result
=
await
meterSample
.
distributeOutSample
({
ids
:
ids
,
userId
:
userId
,
user
:
realname
})
if
(
result
)
{
this
.
$Message
.
success
(
'分配成功!'
)
await
this
.
_page
()
}
},
_changePeople
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择至少一项数据!'
)
return
false
}
else
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
console
.
log
(
'用户'
)
console
.
log
(
user
)
// this.$refs.userModal._openGoupByUserId('分配人员', user.id, '')
this
.
$refs
.
userModal
.
_open
(
'salesman'
)
}
},
...
...
@@ -250,7 +257,7 @@ export default {
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
(
id
)
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterSample
.
pageOutDistribute
(
this
.
formObj
)
...
...
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