Commit a750fa3a authored by hubaoshan's avatar hubaoshan

wcp

parent 37083e0b
......@@ -35,7 +35,7 @@ export function getUserPd(query) {
}
export function getUserId(query) {
return request({
url: '/wcporderuser/getUserPd',
url: '/wcporderuser/getUserId',
method: 'get',
params: query
})
......
......@@ -145,7 +145,6 @@
v-model="dispensePd.valuePd"
placeholder="请选择人员"
size="small"
clearable
style="width: 200px"
>
<el-option
......@@ -196,17 +195,17 @@
{{ scope.row.custCode || '-' }}
</template>
</el-table-column>
<el-table-column label="cusrAbbr" prop="cusrAbbr" width="100" :show-overflow-tooltip="true">
<el-table-column label="cusrAbbr" prop="cusrAbbr" width="120px" :show-overflow-tooltip="true" fixed>
<template slot-scope="scope">
{{ scope.row.cusrAbbr || '-' }}
</template>
</el-table-column>
<el-table-column label="dueDate" prop="dueDate" :show-overflow-tooltip="true">
<el-table-column label="dueDate" prop="dueDate" :show-overflow-tooltip="true" fixed>
<template slot-scope="scope">
{{ scope.row.dueDate || '-' }}
</template>
</el-table-column>
<el-table-column label="packingList" prop="packingList" width="100" :show-overflow-tooltip="true">
<el-table-column label="packingList" prop="packingList" width="120px" :show-overflow-tooltip="true" fixed>
<template slot-scope="scope">
{{ scope.row.packingList || '-' }}
</template>
......@@ -287,7 +286,7 @@
/>
</el-dialog>
<!--详情-->
<el-dialog class="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="80%" append-to-body :close-on-click-modal="false">
<el-dialog class="wcporderAboutSingleDetails" :title="title" :visible.sync="openDetails" width="80%" append-to-body :close-on-click-modal="false">
<el-form ref="formDetails" :model="queryParamsNew" size="small" label-width="90px" :inline="true">
<el-form-item label="packingList" prop="packingList">
<el-input
......@@ -328,17 +327,17 @@
{{ scope.row.custCode || '-' }}
</template>
</el-table-column>
<el-table-column label="cusrAbbr" prop="cusrAbbr" :show-overflow-tooltip="true">
<el-table-column label="cusrAbbr" prop="cusrAbbr" :show-overflow-tooltip="true" width="120px" fixed>
<template slot-scope="scope">
{{ scope.row.cusrAbbr || '-' }}
</template>
</el-table-column>
<el-table-column label="dueDate" prop="dueDate" width="100" :show-overflow-tooltip="true">
<el-table-column label="dueDate" prop="dueDate" width="100" :show-overflow-tooltip="true" fixed>
<template slot-scope="scope">
{{ scope.row.dueDate || '-' }}
</template>
</el-table-column>
<el-table-column label="packingList" prop="packingList" width="100" :show-overflow-tooltip="true">
<el-table-column label="packingList" prop="packingList" :show-overflow-tooltip="true" width="120px" fixed>
<template slot-scope="scope">
{{ scope.row.packingList || '-' }}
</template>
......@@ -621,15 +620,30 @@ export default {
}
},
watch: {
'openDetails': function(newValue, oldValue) {
this.queryParamsNew = {
page: 1,
rows: 10,
TempList: []
// 'openDetails': function(newValue, oldValue) {
// this.queryParamsNew = {
// page: 1,
// rows: 10,
// TempList: []
// }
// }
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
}
})
next()
},
created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询
// this.handleDetail()
},
......@@ -672,6 +686,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.queryParams = {
page: 1,
rows: 10,
......@@ -696,13 +711,13 @@ export default {
})
},
resetPd() {
this.queryParamsNew.page = 1
this.queryParamsNew.packingList = ''
this.queryPd.page = 1
this.dispensePd.packingList = ''
const queryParams = {
userId: this.dispensePd.valuePd,
packingList: this.dispensePd.packingList,
page: this.queryParamsNew.page,
rows: this.queryParamsNew.rows,
page: this.queryPd.page,
rows: this.queryPd.rows,
businessId: this.PdId
}
listWcpOrderPd(queryParams).then(response => {
......@@ -897,9 +912,9 @@ export default {
getWcpOrderId(queryParams).then(response => {
this.queryParamsNew.TempList = response.data.records
this.Newtotal = response.data.total
this.title = '详情信息'
this.openDetails = true
})
this.title = '详情信息'
this.openDetails = true
},
/** 盘点按钮操作 */
handlePd(row) {
......@@ -908,24 +923,18 @@ export default {
this.PdId = row.businessId
}
this.queryPd.PdList = []
// listUser().then(response => {
// this.dispensePd.listPd = response.rows.map(item => ({
// value: item.businessId,
// label: `${item.username} ${item.name}`
// }))
const data = {
businessId: this.PdId
}
getUserId(data).then(response => {
this.dispensePd.listPd = response.rows.map(item => ({
value: item.id,
label: `${item.username} ${item.name}`
this.dispensePd.listPd = response.data.map(item => ({
value: item.businessId,
label: `${item.userName} ${item.name}`
}))
if (row.status !== '0') {
this.dispensePd.valuePd = this.dispensePd.listPd[0].value
}
})
// })
const queryParams = {
userId: this.dispensePd.valuePd,
businessId: this.PdId,
......@@ -938,6 +947,9 @@ export default {
this.title = '盘点'
this.open = true
})
if (this.open === false) {
this.queryPd.page = 1
}
},
handleDispense(row) {
this.dispense.Value = ''
......@@ -955,9 +967,9 @@ export default {
getUserPd(data).then(res => {
this.dispense.Value = res.data.map(item => item.userId)
this.list = res.data.map(item => item.userId)
this.title = '分配'
this.dispenseOpen = true
})
this.title = '分配'
this.dispenseOpen = true
},
handleStart() {
const values = this.list.filter(value => !this.dispense.Value.includes(value))
......@@ -968,9 +980,11 @@ export default {
})
return
}
const listValues = new Set(this.list)
// const newList = this.dispense.Value.filter(value => !listValues.has(value))
const data = {
businessId: this.businessId,
Value: this.dispense.Value
Value: this.dispense.Value.filter(value => !listValues.has(value))
}
this.$confirm('确认要开始盘点吗?', '提示', {
confirmButtonText: '确定',
......@@ -978,10 +992,7 @@ export default {
type: 'warning'
}).then(() => {
wcpOrderPd(data).then(response => {
if (response.code === null) {
this.$message({ message: '已经开始盘点...', type: 'error' })
this.dispenseOpen = false
} else {
if (response.code === 200) {
this.PdList = response.data
this.$message({ message: '开始盘点...', type: 'success' })
this.dispenseOpen = false
......@@ -1004,18 +1015,14 @@ export default {
this.$message({ message: '盘点结束', type: 'success' })
this.getList()
this.dispense.Value = []
this.dispense.userList = []
}).catch(error => {
console.error('Error:', error)
this.dispenseOpen = false
this.list = []
})
})
},
rowClassName(row) {
const list = []
list.push(row)
const className = list[0].row.status === '1' ? 'orange-row' : ''
console.log('rowClassName', className)
const className = list[0].row.status === '2' ? 'orange-row' : ''
return className
},
handlePackingList() {
......@@ -1069,14 +1076,19 @@ export default {
}
}
::v-deep .el-table .orange-row {
background-color: red !important;
background-color: #abfaff !important;
}
.wcporderAboutSingleDetails{
::v-deep .el-dialog {
.el-dialog__body {
max-height: 700px;
}
}
}
.aboutSingleDetails {
.pd{
::v-deep .el-dialog {
margin: 0 auto !important;
height: 70%;
.el-dialog__body {
height: 100%;
max-height: 700px;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment