标准箱列表库存日期

This commit is contained in:
zzyuan 2024-12-12 11:09:43 +08:00
parent d8d2a594ea
commit cab519687c
3 changed files with 120 additions and 32 deletions

69
src/api/ma/standardBox.js Normal file
View File

@ -0,0 +1,69 @@
import request from '@/utils/request'
//标准箱列表
export function getQrCodeBoxListApi(query) {
return request({
url: '/material/bm_qrcode_box/list',
method: 'get',
params: query,
})
}
// 新增标准箱
export function addQrCodeBoxApi(data) {
return request({
url: '/material/bm_qrcode_box/add',
method: 'post',
data: data,
})
}
// 编辑标准箱
export function editQrCodeBoxApi(data) {
return request({
url: '/material/bm_qrcode_box/edit',
method: 'post',
data: data,
})
}
// 删除标准箱
export function delQrCodeBoxApi(data) {
return request({
url: '/material/bm_qrcode_box/deleteById',
method: 'post',
data: data,
})
}
//标准箱-设备明细列表
export function getBoxDetailListApi(query) {
return request({
url: '/material/bm_qrcode_box/getList',
method: 'get',
params: query,
})
}

View File

@ -36,13 +36,13 @@
<!-- <el-table-column show-overflow-tooltip align="center" prop="method" label="请求方式" />--> <!-- <el-table-column show-overflow-tooltip align="center" prop="method" label="请求方式" />-->
<!-- <el-table-column show-overflow-tooltip align="center" prop="method" label="请求地址" />--> <!-- <el-table-column show-overflow-tooltip align="center" prop="method" label="请求地址" />-->
<!-- <el-table-column show-overflow-tooltip align="center" prop="taskId" label="任务ID" />--> <!-- <el-table-column show-overflow-tooltip align="center" prop="taskId" label="任务ID" />-->
<el-table-column show-overflow-tooltip align="center" prop="typeParentName" label="机具类型" /> <el-table-column show-overflow-tooltip align="center" prop="typeName" label="机具类型" />
<el-table-column show-overflow-tooltip align="center" prop="typeName" label="机具规格" /> <el-table-column show-overflow-tooltip align="center" prop="typeModelName" label="机具规格" />
<el-table-column show-overflow-tooltip align="center" prop="preStoreNum" label="操作前库存" /> <el-table-column show-overflow-tooltip align="center" prop="preStoreNum" label="操作前库存" />
<el-table-column show-overflow-tooltip align="center" prop="inNum" label="入库数量" /> <el-table-column show-overflow-tooltip align="center" prop="inNum" label="入库数量" />
<el-table-column show-overflow-tooltip align="center" prop="outNum" label="出库数量" /> <el-table-column show-overflow-tooltip align="center" prop="outNum" label="出库数量" />
<el-table-column show-overflow-tooltip align="center" prop="passNum" label="(退库)合格数量" /> <el-table-column show-overflow-tooltip align="center" prop="passNum" label="(退库)合格数量" />
<el-table-column show-overflow-tooltip align="center" prop="maintenanceNum" label="(退库)维修数量" /> <el-table-column show-overflow-tooltip align="center" prop="repairNum" label="(退库)维修数量" />
<el-table-column show-overflow-tooltip align="center" prop="scrapNum" label="(退库)报废数量" /> <el-table-column show-overflow-tooltip align="center" prop="scrapNum" label="(退库)报废数量" />
<!-- <el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />--> <!-- <el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />-->
<el-table-column show-overflow-tooltip align="center" prop="postStoreNum" label="操作后库存" /> <el-table-column show-overflow-tooltip align="center" prop="postStoreNum" label="操作后库存" />
@ -82,7 +82,7 @@
> >
<el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v"> <el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v">
<template slot="label">{{ item.label }}</template> <template slot="label">{{ item.label }}</template>
{{ logsDetailsInfo[item.content] || '' }} {{ logsDetailsInfo[item.content] }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </el-dialog>
@ -114,8 +114,8 @@ export default {
{ label: '创建人', content: 'creator' }, { label: '创建人', content: 'creator' },
{ label: '模块名称', content: 'modelTitle' }, { label: '模块名称', content: 'modelTitle' },
{ label: '任务ID', content: 'taskId' }, { label: '任务ID', content: 'taskId' },
{ label: '机具类型', content: 'typeParentName' }, { label: '机具类型', content: 'typeName' },
{ label: '机具规格', content: 'typeName' }, { label: '机具规格', content: 'typeModelName' },
{ label: '日期', content: 'createTime' }, { label: '日期', content: 'createTime' },
// { label: '', content: 'preNum' }, // { label: '', content: 'preNum' },
// { label: '', content: 'auditNum' }, // { label: '', content: 'auditNum' },
@ -124,7 +124,7 @@ export default {
{ label: '出库数量', content: 'outNum' }, { label: '出库数量', content: 'outNum' },
{ label: '(退库)总数量', content: 'backNum' }, { label: '(退库)总数量', content: 'backNum' },
{ label: '(退库)合格数量', content: 'passNum' }, { label: '(退库)合格数量', content: 'passNum' },
{ label: '(退库)维修数量', content: 'maintenanceNum' }, { label: '(退库)维修数量', content: 'repairNum' },
{ label: '(退库)报废数量', content: 'scrapNum' }, { label: '(退库)报废数量', content: 'scrapNum' },
{ label: '操作后库存', content: 'postStoreNum' }, { label: '操作后库存', content: 'postStoreNum' },
{ label: '请求地址', content: 'method' }, { label: '请求地址', content: 'method' },
@ -155,8 +155,7 @@ export default {
/* 查看详情 */ /* 查看详情 */
async previewLogsDetails(row) { async previewLogsDetails(row) {
console.log(row, '列表id') console.log(row, '列表id')
const res = await getLogsDetailsApi(row.id) this.logsDetailsInfo = row
this.logsDetailsInfo = res
this.logsDetailsDialogVisible = true this.logsDetailsDialogVisible = true
}, },
async GetDeviceTypeTree() { async GetDeviceTypeTree() {

View File

@ -42,10 +42,15 @@
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span> <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标准箱类型" align="center" prop="boxType" show-overflow-tooltip/> <el-table-column label="标准箱类型" align="center" prop="boxType" show-overflow-tooltip>
<el-table-column label="标准箱名称" align="center" prop="boxName" show-overflow-tooltip/> <template slot-scope="scope">
<dict-tag :options="dict.type.qr_box_type" :value="scope.row.boxType"/>
</template>
</el-table-column>
<el-table-column label="标准箱名称" align="center" prop="boxName" show-overflow-tooltip/>
<el-table-column label="标准箱编码" align="center" prop="boxCode" show-overflow-tooltip/> <el-table-column label="标准箱编码" align="center" prop="boxCode" show-overflow-tooltip/>
<el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip/> <el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip/>
<el-table-column label="创建日期" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column label="操作" align="center" width="400"> <el-table-column label="操作" align="center" width="400">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button size="mini" @click="handleView(row)"> <el-button size="mini" @click="handleView(row)">
@ -91,17 +96,17 @@
<span>{{ (queryDialogForm.pageNum - 1) * queryDialogForm.pageSize + scope.$index + 1 }}</span> <span>{{ (queryDialogForm.pageNum - 1) * queryDialogForm.pageSize + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物资类型" align="center" prop="maType" show-overflow-tooltip/> <el-table-column label="物资类型" align="center" prop="typeName" show-overflow-tooltip/>
<el-table-column label="规格型号" align="center" prop="typeName" show-overflow-tooltip/> <el-table-column label="规格型号" align="center" prop="typeModelName" show-overflow-tooltip/>
<el-table-column label="设备编码" align="center" prop="maCode" show-overflow-tooltip/> <el-table-column label="设备编码" align="center" prop="maCode" show-overflow-tooltip/>
<el-table-column label="录入人" align="center" prop="updateBy" show-overflow-tooltip/> <el-table-column label="录入人" align="center" prop="createBy" show-overflow-tooltip/>
<el-table-column label="操作" align="center" width="120"> <!-- <el-table-column label="操作" align="center" width="120">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button size="mini" type="danger"> <el-button size="mini" type="danger">
删除 删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<pagination :total="totalDialog" <pagination :total="totalDialog"
v-show="totalDialog > 0" v-show="totalDialog > 0"
@ -127,12 +132,13 @@
</template> </template>
<script> <script>
// import { getNewBuyBindListApi } from '@/api/purchase/goodsBind'
import { getQrCodeBoxListApi,addQrCodeBoxApi,editQrCodeBoxApi,delQrCodeBoxApi,getBoxDetailListApi } from '@/api/ma/standardBox'
import QRCode from 'qrcodejs2'; import QRCode from 'qrcodejs2';
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
export default { export default {
name: 'Home', name: 'Home',
dicts: ['purchase_task_status'], dicts: ['qr_box_type'],
data() { data() {
return { return {
total: 0, // total: 0, //
@ -181,12 +187,11 @@ export default {
}, },
// //
async getList() { async getList() {
// this.loading = true this.loading = true
// const res = await getNewBuyBindListApi(this.queryParams) const res = await getQrCodeBoxListApi(this.queryParams)
// this.tableList = res.data.rows this.tableList = res.rows
this.tableList = [{boxType:"标准箱类型",boxName:"标准箱名称",boxCode:"bzx121334343",devNum:"20"},{boxType:"标准箱类型",boxName:"标准箱名称",boxCode:"bzx121334343",devNum:"20"},{boxType:"标准箱类型",boxName:"标准箱名称",boxCode:"bzx121334343",devNum:"20"},] this.total = res.total
// this.total = res.data.total this.loading = false
// this.loading = false
}, },
// //
handleQuery() { handleQuery() {
@ -205,6 +210,12 @@ export default {
}, },
handleAdd(){ handleAdd(){
console.log('新增') console.log('新增')
addQrCodeBoxApi({}).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
}
this.getList()
});
}, },
// //
handleView(row) { handleView(row) {
@ -241,14 +252,15 @@ export default {
// //
handleDetail(row) { handleDetail(row) {
this.open=true; this.open=true;
this.queryDialogForm.boxId = row.boxId;
this.resetQueryDialog() this.resetQueryDialog()
}, },
// //
async getDialogList() { async getDialogList() {
// const res = await getNewBuyBindListApi(this.queryDialogForm) const res = await getBoxDetailListApi(this.queryDialogForm)
// this.tableListDialog = res.data.rows this.tableListDialog = res.rows
this.tableListDialog = [{maType:"抱杆",typeName:"10t",maCode:"bg121334343",updateBy:"张三"},{maType:"抱杆",typeName:"10t",maCode:"bg121334343",updateBy:"张三"},{maType:"抱杆",typeName:"10t",maCode:"bg121334343",updateBy:"张三"},{maType:"抱杆",typeName:"10t",maCode:"bg121334343",updateBy:"张三"}] // this.tableListDialog = [{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""}]
// this.totalDialog = res.data.total this.totalDialog = res.total
this.totalDialog = 3 this.totalDialog = 3
}, },
// //
@ -265,11 +277,19 @@ export default {
// //
handleNotice(row) { handleNotice(row) {
this.$confirm('是否确定删除', '提示', { this.$confirm('是否确定删除标准箱', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => {}).catch(() => {}) }).then(() => {
let param = {
boxId:row.boxId
}
return delQrCodeBoxApi(param);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}, },
// //
handleExport() { handleExport() {