Commit a750fa3a authored by hubaoshan's avatar hubaoshan

wcp

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