Commit ff5cfcf5 authored by hubaoshan's avatar hubaoshan

wcp

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