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