Commit 6e124cce authored by hubaoshan's avatar hubaoshan

wcp

parent 5130ca7e
import request from '@/utils/request'
import Qs from 'qs'
export function getUser(params) {
return request({
url: 'wcporderuser/userList',
method: 'get',
params
})
}
export function getPdList(params) {
return request({
url: 'wcporderuser/pdList',
method: 'get',
params
})
}
export function getViewList(query) {
return request({
url: 'wcporderuser/queryViewList',
method: 'get',
params: query
})
}
export function updatePd(data) {
return request({
url: 'wcporderlistpd/updatePd',
method: 'get',
params: data
})
}
export function getDelList(query) {
return request({
url: '/wcporderlistpd/getDelList',
method: 'get',
params: query
})
}
export function delPd(data) {
return request({
url: '/wcporderlistpd/delPd',
method: 'get',
params: data
})
}
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
<span>{{ queryForm.orderSn || '-' }}</span> <span>{{ queryForm.orderSn || '-' }}</span>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="盘点总数" prop="count"> <el-form-item label="盘点总数" prop="totalCount">
<template> <template>
<span>{{ queryForm.count || '-' }}</span> <span>{{ queryForm.totalCount }}</span>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="已完成数" prop="countEnd"> <el-form-item label="已完成数" prop="endCount">
<template> <template>
<span>{{ queryForm.countEnd || '-' }}</span> <span>{{ queryForm.endCount }}</span>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="pallet" prop="pallet"> <el-form-item label="pallet" prop="pallet">
...@@ -31,16 +31,20 @@ ...@@ -31,16 +31,20 @@
clearable clearable
placeholder="请输入pallet" placeholder="请输入pallet"
style="width: 200px" style="width: 200px"
@keyup.enter.native="move"
/> />
</el-form-item> </el-form-item>
<el-form-item label="value" prop="value"> <el-form-item label="value" prop="value">
<el-input <el-input
ref="input1"
v-model="queryForm.value" v-model="queryForm.value"
clearable clearable
placeholder="请输入value" placeholder="请输入value"
style="width: 200px" style="width: 200px"
@keyup.enter.native="handleEnd"
/> />
</el-form-item> </el-form-item>
<!-- <div><hr></div>-->
<div class="buttonRegion"> <div class="buttonRegion">
<el-button class="button_rowBtn" type="primary" @click="handleView">查看</el-button> <el-button class="button_rowBtn" type="primary" @click="handleView">查看</el-button>
<el-button style="float: right" class="button_rowBtn" type="primary" @click="handleDel">删除</el-button> <el-button style="float: right" class="button_rowBtn" type="primary" @click="handleDel">删除</el-button>
...@@ -71,9 +75,9 @@ ...@@ -71,9 +75,9 @@
{{ scope.row.quantity || '-' }} {{ scope.row.quantity || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="orderCode" prop="orderCode" :show-overflow-tooltip="true"> <el-table-column label="pdCode" prop="pdCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.orderCode || '-' }}</span> <span>{{ scope.row.pdCode || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="subCode" prop="subCode" :show-overflow-tooltip="true"> <el-table-column label="subCode" prop="subCode" :show-overflow-tooltip="true">
...@@ -83,11 +87,11 @@ ...@@ -83,11 +87,11 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
class="pagination"
v-show="Pdtotal>0" v-show="Pdtotal>0"
class="pagination"
:total="Pdtotal" :total="Pdtotal"
:page.sync="queryPd.PdList.page" :page.sync="queryPd.page"
:limit.sync="queryPd.PdList.rows" :limit.sync="queryPd.rows"
@pagination="handleView" @pagination="handleView"
/> />
</el-dialog> </el-dialog>
...@@ -95,24 +99,28 @@ ...@@ -95,24 +99,28 @@
<div class="top"> <div class="top">
<div class="oneButtion"> <div class="oneButtion">
<el-button <el-button
ref="buttonAAAA"
:class="selectedButton === 'AAAA' ? 'button_rowBtn_action' : ''"
type="primary" type="primary"
@click="handleButton" @click="handleButton('AAAA')"
> >
<div class="buttionText"> <div class="buttionText">
<span>AAAA</span> <span>AAAA</span>
</div> </div>
</el-button> </el-button>
<el-button <el-button
:class="selectedButton === 'BBBB' ? 'button_rowBtn_action' : ''"
type="primary" type="primary"
@click="handleButton" @click="handleButton('BBBB')"
> >
<div class="buttionText"> <div class="buttionText">
<span>BBBB</span> <span>BBBB</span>
</div> </div>
</el-button> </el-button>
<el-button <el-button
:class="selectedButton === 'CCCC' ? 'button_rowBtn_action' : ''"
type="primary" type="primary"
@click="handleButton" @click="handleButton('CCCC')"
> >
<div class="buttionText"> <div class="buttionText">
<span>CCCC</span> <span>CCCC</span>
...@@ -123,7 +131,7 @@ ...@@ -123,7 +131,7 @@
<br> <br>
<!-- 确认删除按钮 --> <!-- 确认删除按钮 -->
<div class="clearRegion"> <div class="clearRegion">
<el-button class="button_rowBtn" type="warning">删除</el-button> <el-button class="button_rowBtn" type="primary" @click="deletePd">删除</el-button>
</div> </div>
<br> <br>
<el-table v-loading="loading" class="queryTable" border :data="queryPdDel.PdDelList" :row-class-name="rowClassName"> <el-table v-loading="loading" class="queryTable" border :data="queryPdDel.PdDelList" :row-class-name="rowClassName">
...@@ -133,7 +141,7 @@ ...@@ -133,7 +141,7 @@
{{ scope.row.orderId || '-' }} {{ scope.row.orderId || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="custCode" prop="custCode" :show-overflow-tooltip="true" > <el-table-column label="custCode" prop="custCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.custCode || '-' }} {{ scope.row.custCode || '-' }}
</template> </template>
...@@ -189,9 +197,9 @@ ...@@ -189,9 +197,9 @@
{{ scope.row.m3 || '-' }} {{ scope.row.m3 || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="orderCode" prop="orderCode" :show-overflow-tooltip="true"> <el-table-column label="pdCode" prop="pdCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.orderCode || '-' }}</span> <span>{{ scope.row.pdCode || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="orderListId" prop="orderListId" width="100" :show-overflow-tooltip="true"> <el-table-column label="orderListId" prop="orderListId" width="100" :show-overflow-tooltip="true">
...@@ -221,81 +229,198 @@ ...@@ -221,81 +229,198 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="Pdtotal>0" v-show="total>0"
class="page" class="page"
:total="Pdtotal" :total="total"
:page.sync="queryPd.PdList.page" :page.sync="queryPd.page"
:limit.sync="queryPd.PdList.rows" :limit.sync="queryPd.rows"
@pagination="handleView" @pagination="handleView"
/> />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getInfo } from '@/api/login'
import { delPd, getDelList, getPdList, getViewList, updatePd } from '@/api/materialInventory'
export default { export default {
name: 'Inventory', name: 'Inventory',
data() { data() {
return { return {
selectedButton: '',
loading: false, loading: false,
queryPd: { queryPd: {
page: 1, page: 1,
rows: 10, rows: 10,
PdList: [{ orderId: '123', custCode: '20240809', packingList: '41565464as', orderCode: '20240809', subCode: 1, quantity: 5 }] PdList: []
}, },
queryPdDel: { queryPdDel: {
page: 1, page: 1,
rows: 10, rows: 10,
PdDelList: [{ orderId: '123',cusrAbbr: '16555XX',dueDate: '2024/8/11', custCode: '20240809', packingList: '41565464as', orderCode: '20240809', subCode: 1, quantity: 5 }] PdDelList: []
}, },
Pdtotal: 1, Pdtotal: undefined,
total: undefined,
open: false, open: false,
openDel: false, openDel: false,
title: '', title: '',
queryForm: { queryForm: {
pallet: '', pallet: '',
value: '', value: '',
orderSn: '1263xxxxxxx', orderSn: '',
countEnd: '80', endCount: '',
count: '100' totalCount: ''
}, },
userIdNew: '',
// 表单校验 // 表单校验
rules: { rules: {
} }
} }
}, },
created() { created() {
// this.getList()
}, },
mounted() { mounted() {
}, },
methods: { methods: {
handleView(row) { handleView() {
if (row.businessId !== undefined && row.businessId !== '' && row.businessId !== null) { this.queryPd.PdList = []
this.PdId = row.businessId getInfo().then(response => {
const queryParams = {
businessId: response.data.user.businessId,
page: this.queryPd.page,
rows: this.queryPd.rows
} }
// this.queryPd.PdList = [] getViewList(queryParams).then(response => {
// const queryParams = { this.queryPd.PdList = response.data.records
// businessId: this.PdId, this.Pdtotal = response.data.total
// page: this.queryPd.page,
// rows: this.queryPd.rows
// }
// listWcpOrderPd(queryParams).then(response => {
// this.queryPd.PdList = response.data.records
// this.Pdtotal = response.data.total
// })
this.title = '查看' this.title = '查看'
this.open = true this.open = true
})
})
}, },
handleDel(row) { handleDel() {
this.selectedButton = 'AAAA'
getInfo().then(response => {
const queryParams = {
businessId: response.data.user.businessId,
page: this.queryPd.page,
rows: this.queryPd.rows,
pallet: ''
}
switch (this.selectedButton) {
case 'AAAA':
queryParams.pallet = 'AAAA'
break
case 'BBBB':
queryParams.pallet = 'BBBB'
break
case 'CCCC':
queryParams.pallet = 'CCCC'
break
}
getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records
this.total = response.data.total
this.title = '删除' this.title = '删除'
this.openDel = true this.openDel = true
})
})
this.getList()
}, },
rowClassName(row) { handleButton(buttonName) {
const list = [] this.selectedButton = buttonName
list.push(row) getInfo().then(response => {
return list[0].row.status === '1' ? 'orange-row' : '12' const queryParams = {
businessId: response.data.user.businessId,
page: this.queryPd.page,
rows: this.queryPd.rows,
pallet: ''
}
switch (this.selectedButton) {
case 'AAAA':
queryParams.pallet = 'AAAA'
break
case 'BBBB':
queryParams.pallet = 'BBBB'
break
case 'CCCC':
queryParams.pallet = 'CCCC'
break
}
getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records
this.total = response.data.total
})
})
this.getList()
this.queryPdDel.PdDelList = []
}, },
handleButton() {} getList() {
getInfo().then(response => {
const data = {
businessId: response.data.user.businessId
}
this.userIdNew = response.data.user.businessId
getPdList(data).then(res => {
this.queryForm.totalCount = res.data[0].totalCount
this.queryForm.endCount = res.data[0].endCount
this.queryForm.orderSn = res.data[0].orderSn
})
})
},
move() {
this.$nextTick().then(() => {
this.$refs.input1.focus()
})
},
handleEnd() {
const data = {
pdCode: this.queryForm.value,
userId: this.userIdNew,
pallet: this.queryForm.pallet
}
if (this.queryForm.orderSn !== this.queryForm.value) {
this.$message.error({
message: 'orderSn' + this.queryForm.orderSn + '和' + this.queryForm.value + '不相等',
duration: 2000
})
} else {
updatePd(data)
this.queryForm.pallet = ''
this.queryForm.value = ''
}
this.getList()
},
// this.$message.success({
// message: '盘点完成',
// duration: 2000
// })
deletePd() {
getInfo().then(response => {
const queryParams = {
businessId: response.data.user.businessId,
page: this.queryPd.page,
rows: this.queryPd.rows,
pallet: ''
}
switch (this.selectedButton) {
case 'AAAA':
queryParams.pallet = 'AAAA'
break
case 'BBBB':
queryParams.pallet = 'BBBB'
break
case 'CCCC':
queryParams.pallet = 'CCCC'
break
}
delPd(queryParams)
})
this.handleDel()
},
rowClassName({ row }) {
return row.status === '1' ? 'orange-row' : ''
}
} }
} }
</script> </script>
...@@ -332,4 +457,10 @@ export default { ...@@ -332,4 +457,10 @@ export default {
font-size: 17px; font-size: 17px;
width: 120px; width: 120px;
} }
.button_rowBtn_action{
background-color: blue !important;
}
::v-deep .el-table .orange-row {
background-color: red !important;
}
</style> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</el-table-column> </el-table-column>
<el-table-column label="人员"> <el-table-column label="人员">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.user || '-' }}</span> <span>{{ scope.row.name || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
<script> <script>
import { getInfo } from '@/api/login'
import { getUser } from '@/api/materialInventory'
export default { export default {
name: 'MaterialInventory', name: 'MaterialInventory',
data() { data() {
...@@ -37,37 +40,13 @@ export default { ...@@ -37,37 +40,13 @@ export default {
ptype: '', ptype: '',
dealStatus: '0' dealStatus: '0'
}, },
// 选中的下坐表 id: '',
actionIndex: null,
// 标签集合
tabList: [
{
type: null,
number: null
},
{
type: null,
number: null
},
{
type: null,
number: null
},
{
type: null,
number: null
},
{
type: null,
number: null
}
],
// 对应标签下的列表数据 // 对应标签下的列表数据
tableList: [{ orderSn: '20240809', user: '李四' }] tableList: []
} }
}, },
created() { created() {
// this.getTabList() this.getList()
}, },
methods: { methods: {
// 处理 // 处理
...@@ -78,9 +57,18 @@ export default { ...@@ -78,9 +57,18 @@ export default {
businessId: item.businessId businessId: item.businessId
} }
}) })
},
getList() {
getInfo().then(response => {
const data = {
businessId: response.data.user.businessId
}
getUser(data).then(res => {
this.tableList = res.data
})
})
} }
} }
} }
</script> </script>
......
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