Commit ff5cfcf5 authored by hubaoshan's avatar hubaoshan

wcp

parent b5f53387
...@@ -114,3 +114,10 @@ export function listUser(query) { ...@@ -114,3 +114,10 @@ export function listUser(query) {
params: query params: query
}) })
} }
export function listPackingList(query) {
return request({
url: '/wcporderlist/listPackingList',
method: 'GET',
params: query
})
}
...@@ -11,16 +11,6 @@ ...@@ -11,16 +11,6 @@
style="width: 150px" style="width: 150px"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="status" prop="status">-->
<!-- <el-input-->
<!-- v-model="queryParams.status"-->
<!-- placeholder="请输入status"-->
<!-- clearable-->
<!-- :maxlength="1"-->
<!-- size="small"-->
<!-- style="width: 150px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择status" clearable size="small"> <el-select v-model="queryParams.status" placeholder="请选择status" clearable size="small">
<el-option <el-option
...@@ -135,17 +125,17 @@ ...@@ -135,17 +125,17 @@
<!-- 盘点--> <!-- 盘点-->
<el-dialog class="pd" :title="title" :visible.sync="open" width="80%" append-to-body> <el-dialog class="pd" :title="title" :visible.sync="open" width="80%" append-to-body>
<el-form ref="formDetails" :model="dispense" size="small" label-width="90px" :inline="true"> <el-form ref="formDetails" :model="dispensePd" size="small" label-width="90px" :inline="true">
<el-form-item label="人员"> <el-form-item label="人员">
<el-select <el-select
v-model="dispense.valuePd" v-model="dispensePd.valuePd"
placeholder="请选择人员" placeholder="请选择人员"
size="small" size="small"
clearable clearable
style="width: 200px" style="width: 200px"
> >
<el-option <el-option
v-for="item in listPd" v-for="item in dispensePd.listPd"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
...@@ -154,7 +144,7 @@ ...@@ -154,7 +144,7 @@
</el-form-item> </el-form-item>
<el-form-item label="packingList" prop="packingList"> <el-form-item label="packingList" prop="packingList">
<el-input <el-input
v-model="dispense.packingList" v-model="dispensePd.packingList"
placeholder="请输入packingList" placeholder="请输入packingList"
clearable clearable
:maxlength="255" :maxlength="255"
...@@ -168,10 +158,11 @@ ...@@ -168,10 +158,11 @@
:type="commonField.typePrimary" :type="commonField.typePrimary"
:icon="commonField.queryIcon" :icon="commonField.queryIcon"
:size="commonField.smallSize" :size="commonField.smallSize"
@click="handlePdPackingList"
>查询</el-button> >查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" border :data="queryPd.PdList" :row-class-name="rowClassName"> <el-table v-loading="loading" class="queryPd" border :data="queryPd.PdList" :row-class-name="rowClassName">
<el-table-column type="index" label="序号" width="55" align="center" fixed /> <el-table-column type="index" label="序号" width="55" align="center" fixed />
<el-table-column v-if="false" label="orderId" prop="orderId" :show-overflow-tooltip="true"> <el-table-column v-if="false" label="orderId" prop="orderId" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -259,7 +250,7 @@ ...@@ -259,7 +250,7 @@
{{ scope.row.subCode || '-' }} {{ scope.row.subCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="status" prop="status" :show-overflow-tooltip="true"> <el-table-column label="status" prop="status" :show-overflow-tooltip="true" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status || '-' }} {{ scope.row.status || '-' }}
</template> </template>
...@@ -268,17 +259,17 @@ ...@@ -268,17 +259,17 @@
<pagination <pagination
v-show="Pdtotal>0" v-show="Pdtotal>0"
:total="Pdtotal" :total="Pdtotal"
:page.sync="queryPd.PdList.page" :page.sync="queryPd.page"
:limit.sync="queryPd.PdList.rows" :limit.sync="queryPd.rows"
@pagination="handlePd" @pagination="handlePd"
/> />
</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="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="80%" append-to-body :close-on-click-modal="false">
<el-form ref="formDetails" :model="details" 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
v-model="details.packingList" v-model="queryParamsNew.packingList"
placeholder="请输入packingList" placeholder="请输入packingList"
clearable clearable
:maxlength="255" :maxlength="255"
...@@ -286,6 +277,15 @@ ...@@ -286,6 +277,15 @@
style="width: 200px" style="width: 200px"
/> />
</el-form-item> </el-form-item>
<el-form-item>
<el-button
:class="commonField.queryClass"
:type="commonField.typePrimary"
:icon="commonField.queryIcon"
:size="commonField.smallSize"
@click="handlePackingList"
>查询</el-button>
</el-form-item>
</el-form> </el-form>
<br> <br>
<el-table v-loading="loading" border :data="queryParamsNew.TempList"> <el-table v-loading="loading" border :data="queryParamsNew.TempList">
...@@ -469,7 +469,7 @@ import { ...@@ -469,7 +469,7 @@ import {
exportWcpOrder, exportWcpOrder,
getWcpOrder, getWcpOrder,
getWcpOrderId, getWcpOrderId,
importExcel, listUser, importExcel, listPackingList, listUser,
listWcpOrder, listWcpOrder,
listWcpOrderPd, listWcpOrderPd,
updateWcpOrder, updateWcpOrder,
...@@ -484,27 +484,13 @@ export default { ...@@ -484,27 +484,13 @@ export default {
data() { data() {
return { return {
orderSn: '', orderSn: '',
details: {},
Value: [], Value: [],
dispensePd: {
valuePd: [], valuePd: [],
listPd: [ listPd: [],
{ packingList: ''
value: '选项1',
label: '20240809 张三'
},
{
value: '选项2',
label: '20240819 李四'
}, },
{ listPd: [],
value: '选项3',
label: '20240825 王五'
},
{
value: '选项4',
label: '20240829 老六'
}
],
// userList: [], // userList: [],
addIcon: 'el-icon-plus', addIcon: 'el-icon-plus',
currentPage: 1, currentPage: 1,
...@@ -585,7 +571,8 @@ export default { ...@@ -585,7 +571,8 @@ export default {
queryParamsNew: { queryParamsNew: {
page: 1, page: 1,
rows: 10, rows: 10,
TempList: [] TempList: [],
packingList: ''
}, },
businessId: '', businessId: '',
id: '', id: '',
...@@ -857,21 +844,31 @@ export default { ...@@ -857,21 +844,31 @@ export default {
}, },
/** 盘点按钮操作 */ /** 盘点按钮操作 */
handlePd(row) { handlePd(row) {
this.dispensePd.packingList = ''
if (row.businessId !== undefined && row.businessId !== '' && row.businessId !== null) { if (row.businessId !== undefined && row.businessId !== '' && row.businessId !== null) {
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}`
}))
this.dispensePd.valuePd = this.dispensePd.listPd[1].value
})
const queryParams = { const queryParams = {
userId: this.dispensePd.valuePd,
businessId: this.PdId, businessId: this.PdId,
page: this.queryPd.page, page: this.queryPd.page,
rows: this.queryPd.rows rows: this.queryPd.rows
} }
console.log(queryParams)
listWcpOrderPd(queryParams).then(response => { listWcpOrderPd(queryParams).then(response => {
this.queryPd.PdList = response.data.records this.queryPd.PdList = response.data.records
this.Pdtotal = response.data.total this.Pdtotal = response.data.total
})
this.title = '盘点' this.title = '盘点'
this.open = true this.open = true
})
}, },
handleDispense(row) { handleDispense(row) {
this.dispense.Value = '' this.dispense.Value = ''
...@@ -932,17 +929,34 @@ export default { ...@@ -932,17 +929,34 @@ export default {
rowClassName(row) { rowClassName(row) {
const list = [] const list = []
list.push(row) list.push(row)
const className = list[0].row.status === '1' ? 'orange-row' : '12' const className = list[0].row.status === '1' ? 'orange-row' : ''
console.log('123', (list[0].row.status))
console.log('rowClassName', className) console.log('rowClassName', className)
return className return className
// if (list[0].row.status === '1') {
// return 'orange-row'
// }
}, },
formatLabel(label) { handlePackingList() {
// 替换空格为 &nbsp; const queryParams = {
return label.replace(/ /g, '\u00A0') packingList: this.queryParamsNew.packingList,
page: this.queryParamsNew.page,
rows: this.queryParamsNew.rows
}
listPackingList(queryParams).then(
response => {
this.queryParamsNew.TempList = response.rows
this.Newtotal = response.data.total
})
},
handlePdPackingList() {
const queryParams = {
userId: this.dispensePd.valuePd,
packingList: this.dispensePd.packingList,
page: this.queryParamsNew.page,
rows: this.queryParamsNew.rows,
businessId: this.PdId
}
listWcpOrderPd(queryParams).then(response => {
this.queryPd.PdList = response.data.records
this.Pdtotal = response.data.total
})
} }
} }
} }
...@@ -958,12 +972,8 @@ export default { ...@@ -958,12 +972,8 @@ export default {
margin-bottom: 10px margin-bottom: 10px
} }
} }
.pd { ::v-deep .el-table .orange-row {
.el-table tr { background-color: red !important;
tr.el-table__row.orange-row {
background-color: orange;
}
}
} }
.aboutSingleDetails { .aboutSingleDetails {
::v-deep .el-dialog { ::v-deep .el-dialog {
......
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