Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling
commit
6e8b12e2a6
9 changed files with 1614 additions and 1378 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,164 @@ |
||||
<template> |
||||
<el-dialog |
||||
title="批量送检" |
||||
append-to-body |
||||
:modelValue="openShow" |
||||
width="90%" |
||||
@close="closeDialog" |
||||
> |
||||
<el-table |
||||
ref="xTable" |
||||
:loading="btnLoading" |
||||
:data="rowData" |
||||
border |
||||
show-overflow |
||||
class="el-table-element" |
||||
stripe |
||||
height="400px" |
||||
highlight-current-row |
||||
row-id="rowIndex" |
||||
> |
||||
<!-- <el-table-column type="checkbox" width="40" /> --> |
||||
<el-table-column label="物料编码" align="center" prop="goodsCode" min-width="120" /> |
||||
|
||||
<el-table-column label="物料名称" align="center" prop="goodsName" min-width="150" /> |
||||
<el-table-column label="送检数量" align="center" prop="esQty" min-width="150"> |
||||
<template #header> |
||||
<span><i style="color: red">*</i>送检数量</span> |
||||
</template> |
||||
<template #default="scope"> |
||||
<!-- <el-input v-model="scope.row.esQty" placeholder="请输入" /> --> |
||||
<el-input-number v-model="scope.row.esQty" :min="0" label="请输入"></el-input-number> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="送检部门" align="center" prop="esDeptId" min-width="150"> |
||||
<template #header> |
||||
<span><i style="color: red">*</i>送检部门</span> |
||||
</template> |
||||
<template #default="scope"> |
||||
<el-select |
||||
v-model="scope.row.esDeptId" |
||||
clearable |
||||
filterable |
||||
@change="deptChange(scope.row)" |
||||
> |
||||
<el-option |
||||
v-for="(item, index) in deplList" |
||||
:key="index" |
||||
:label="item.deptName" |
||||
:value="item.id" |
||||
></el-option> |
||||
</el-select> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="炉批号" align="center" prop="stovePiNo" min-width="100" /> |
||||
<el-table-column label="型号/牌号" align="center" prop="specifications" min-width="100" /> |
||||
<el-table-column label="生产标识" align="center" min-width="100" prop="quantityLevel" /> |
||||
<el-table-column label="检验编号" align="center" prop="checkoutCode" width="100" /> |
||||
<el-table-column label="供方代码" align="center" prop="splyCode" width="100" /> |
||||
</el-table> |
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
import { getDeplList } from '@/api/flowManagement/index'; |
||||
import { save } from '@/api/storeManagement/matureSubmission'; |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
rowData: { |
||||
type: Array, |
||||
default: () => [], |
||||
}, |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
deplList: [], |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
|
||||
console.log('rowData', this.rowData); |
||||
this.getDeplLists(); |
||||
}, |
||||
methods: { |
||||
// 制单部门名称 |
||||
deptChange(row) { |
||||
let sel = this.deplList.filter(item => item.id == row.esDeptId)[0]; |
||||
row.esDept = sel.deptName; |
||||
}, |
||||
// 获取部门列表 |
||||
getDeplLists() { |
||||
getDeplList().then(res => { |
||||
let data = res.data.data; |
||||
data.forEach(item => { |
||||
if (item.deptName == '热表分厂') { |
||||
this.deplList = item.children || []; |
||||
} |
||||
}); |
||||
}); |
||||
}, |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
submit() { |
||||
if (!this.rowData || this.rowData.length === 0) { |
||||
this.$message.warning('没有可提交的数据'); |
||||
return; |
||||
} |
||||
|
||||
// 2. 遍历每一行进行校验 |
||||
for (let i = 0; i < this.rowData.length; i++) { |
||||
const row = this.rowData[i]; |
||||
|
||||
// 校验送检数量 (esQty) |
||||
// 注意:el-input-number 的值可能是数字 0,如果是 0 通常也视为无效或未输入,根据业务需求调整 |
||||
// 如果允许为0,则只判断 null/undefined;如果不允许为0,则判断 !row.esQty |
||||
if (row.esQty === null || row.esQty === undefined || row.esQty === '') { |
||||
this.$message.error(`第 ${i + 1} 行数据的“送检数量”不能为空`); |
||||
return; // 发现错误立即停止 |
||||
} |
||||
|
||||
// 校验送检部门 (esDeptId) |
||||
if (!row.esDeptId) { |
||||
this.$message.error(`第 ${i + 1} 行数据的“送检部门”不能为空`); |
||||
return; // 发现错误立即停止 |
||||
} |
||||
} |
||||
|
||||
// 3. 校验通过,执行提交逻辑 |
||||
console.log('校验通过,准备提交数据:', this.rowData); |
||||
save(this.rowData) |
||||
.then(res => { |
||||
this.$message.success('送检成功'); |
||||
this.closeDialog(); |
||||
}) |
||||
.catch(err => { |
||||
this.closeDialog(); |
||||
}); |
||||
// TODO: 调用后端接口 |
||||
// submitInspection(this.rowData).then(res => { |
||||
// if (res.data.code === 200) { |
||||
// this.$message.success('送检成功'); |
||||
// this.closeDialog(); |
||||
// } |
||||
// }); |
||||
|
||||
// this.$message.success('校验通过'); |
||||
// this.closeDialog(); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -1,385 +1,371 @@ |
||||
<template> |
||||
<basic-container> |
||||
<avue-crud :option="option" v-model:search="search" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" |
||||
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
||||
@refresh-change="refreshChange" @on-load="onLoad"> |
||||
<template #menu-left> |
||||
<!-- 批量送检 对接erp中的数据 --> |
||||
<el-button type="primary" @click="allocationFun()">批量送检</el-button> |
||||
<!-- <el-button type="danger" @click="handle()">删除</el-button> --> |
||||
</template> |
||||
<template #menu-right> |
||||
<el-button type="warning" @click="searchData(0)" plain>即将到期</el-button> |
||||
<el-button type="danger" @click="searchData(1)" plain>已到期</el-button> |
||||
<!-- <el-button type="primary" @click="allocationFun()">批量调拨</el-button> |
||||
<basic-container> |
||||
<avue-crud |
||||
:option="option" |
||||
v-model:search="search" |
||||
:table-loading="loading" |
||||
:data="data" |
||||
v-model="form" |
||||
v-model:page="page" |
||||
ref="crud" |
||||
@row-del="rowDel" |
||||
@search-change="searchChange" |
||||
@search-reset="searchReset" |
||||
@selection-change="selectionChange" |
||||
@current-change="currentChange" |
||||
@size-change="sizeChange" |
||||
@refresh-change="refreshChange" |
||||
@on-load="onLoad" |
||||
> |
||||
<template #menu-left> |
||||
<!-- 批量送检 对接erp中的数据 --> |
||||
<el-button type="primary" @click="allocationFun()">批量送检</el-button> |
||||
<!-- <el-button type="danger" @click="handle()">删除</el-button> --> |
||||
</template> |
||||
<template #menu-right> |
||||
<el-button type="warning" @click="searchData(0)" plain>即将到期</el-button> |
||||
<el-button type="danger" @click="searchData(1)" plain>已到期</el-button> |
||||
<!-- <el-button type="primary" @click="allocationFun()">批量调拨</el-button> |
||||
<el-button type="primary" @click="handle()">导入</el-button> --> |
||||
</template> |
||||
<template #menu="scope"> |
||||
<!-- <el-button type="text" @click="handle(scope.row.tbId)">调拨</el-button> --> |
||||
</template> |
||||
</template> |
||||
<template #menu="scope"> |
||||
<!-- <el-button type="text" @click="handle(scope.row.tbId)">调拨</el-button> --> |
||||
</template> |
||||
</avue-crud> |
||||
|
||||
</avue-crud> |
||||
</basic-container> |
||||
<!-- 到期送检 --> |
||||
<inspectionDialog |
||||
ref="inspectionDialog" |
||||
@closeDialog="closeDialog" |
||||
:showDialog="inspectionShow" |
||||
:rowData="rowData" |
||||
v-if="inspectionShow" |
||||
/> |
||||
</basic-container> |
||||
</template> |
||||
<script> |
||||
import {getList} from "@/api/storeManagement/matureSubmission" |
||||
import { getList } from '@/api/storeManagement/matureSubmission'; |
||||
import inspectionDialog from './InspectionDialog.vue'; |
||||
export default { |
||||
data() { |
||||
return { |
||||
selectionList: [], |
||||
loading: false, |
||||
search:{ |
||||
days:30 |
||||
}, |
||||
option: { |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
tip: false, |
||||
// size: 'medium', |
||||
simplePage: true, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: true, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
editBtnText: '修改', |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
viewBtnText: '详情', |
||||
labelWidth: 120, |
||||
menuWidth: 180, |
||||
dialogWidth: 1040, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: true, |
||||
searchShowBtn: false, |
||||
columnSort: true, |
||||
excelBtn: true, |
||||
columnSort: true, |
||||
index: false, |
||||
showOverflowTooltip: true, |
||||
menu: false, |
||||
searchLabelPosition: 'left', |
||||
searchLabelWidth: 'auto', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
align: 'center', |
||||
column: [ |
||||
{ |
||||
label: '送检单号', |
||||
prop: 'esCode', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 200, |
||||
}, |
||||
{ |
||||
label: '物料编码', |
||||
prop: 'goodsCode', |
||||
// bind: 'coGoods.goodsCode', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '物料名称', |
||||
prop: 'goodsName', |
||||
// bind: 'coGoods.goodsName', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
// { |
||||
// label: '库房名称', |
||||
// prop: 'shName', |
||||
// // bind: 'stRealtimeStock.coStorehouse.shName', |
||||
// sortable: true, |
||||
// filter: true, |
||||
// span: 12, |
||||
// search: false, |
||||
// width: 120, |
||||
// }, |
||||
{ |
||||
label: '所属仓库', |
||||
prop: 'shName', |
||||
// bind: 'stRealtimeStock.storageLocation.location', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 160, |
||||
headerAlign: 'center', |
||||
}, |
||||
{ |
||||
label: '炉批号', |
||||
prop: 'stovePiNo', |
||||
// bind: 'stovePiNo', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '检验编号', |
||||
prop: 'checkCode', |
||||
// bind: 'checkCode', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '质量等级', |
||||
prop: 'quantityLevel', |
||||
// bind: 'quantityLevel', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '送检数量', |
||||
prop: 'esQty', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '送检部门', |
||||
prop: 'esDept', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '送检日期', |
||||
prop: 'esTime', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '送检人', |
||||
prop: 'esMan', |
||||
// bind: 'userName', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '临期天数', |
||||
prop:"expireDays", |
||||
width:120 |
||||
}, |
||||
{ |
||||
label: '到期状态', |
||||
prop: 'expireStatus', |
||||
// bind: 'wsMan.userName', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
type: 'select', |
||||
dicData: [ |
||||
{ |
||||
label: '未到期', |
||||
value: 0 |
||||
}, |
||||
{ |
||||
label: '已到期', |
||||
value: 1 |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
label: '送检状态', |
||||
prop: 'applyFor', |
||||
// bind: 'wsMan.userName', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 120, |
||||
type: 'select', |
||||
dicData: [ |
||||
{ |
||||
label: '未送检', |
||||
value: false |
||||
}, |
||||
{ |
||||
label: '已送检', |
||||
value: true |
||||
} |
||||
] |
||||
}, |
||||
components: { |
||||
inspectionDialog, |
||||
}, |
||||
|
||||
] |
||||
}, |
||||
form: { |
||||
data() { |
||||
return { |
||||
inspectionShow: false, |
||||
selectionList: [], |
||||
loading: false, |
||||
search: { |
||||
days: 30, |
||||
}, |
||||
option: { |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
tip: false, |
||||
simplePage: true, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: true, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
editBtnText: '修改', |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
viewBtnText: '详情', |
||||
labelWidth: 120, |
||||
menuWidth: 180, |
||||
dialogWidth: 1040, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: true, |
||||
searchShowBtn: false, |
||||
columnSort: true, |
||||
excelBtn: true, |
||||
columnSort: true, |
||||
index: false, |
||||
showOverflowTooltip: true, |
||||
menu: false, |
||||
searchLabelPosition: 'left', |
||||
searchLabelWidth: 'auto', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
align: 'center', |
||||
column: [ |
||||
{ |
||||
label: '送检单号', |
||||
prop: 'esCode', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 200, |
||||
}, |
||||
{ |
||||
label: '物料编码', |
||||
prop: 'goodsCode', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '物料名称', |
||||
prop: 'goodsName', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
|
||||
}, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
query:{} |
||||
} |
||||
{ |
||||
label: '所属仓库', |
||||
prop: 'shName', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 160, |
||||
headerAlign: 'center', |
||||
}, |
||||
{ |
||||
label: '炉批号', |
||||
prop: 'stovePiNo', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '检验编号', |
||||
prop: 'checkCode', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '质量等级', |
||||
prop: 'quantityLevel', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '送检数量', |
||||
prop: 'esQty', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '送检部门', |
||||
prop: 'esDept', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '送检日期', |
||||
prop: 'esTime', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '送检人', |
||||
prop: 'esMan', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: false, |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '临期天数', |
||||
prop: 'expireDays', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
label: '到期状态', |
||||
prop: 'expireStatus', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 120, |
||||
fixed: 'right', |
||||
type: 'select', |
||||
dicData: [ |
||||
{ |
||||
label: '即将到期', |
||||
value: 0, |
||||
}, |
||||
{ |
||||
label: '已超期', |
||||
value: 1, |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '送检状态', |
||||
prop: 'applyFor', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
width: 120, |
||||
type: 'select', |
||||
fixed: 'right', |
||||
dicData: [ |
||||
{ |
||||
label: '未送检', |
||||
value: false, |
||||
}, |
||||
{ |
||||
label: '已送检', |
||||
value: true, |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
}, |
||||
form: {}, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
query: {}, |
||||
rowData:[] |
||||
}; |
||||
}, |
||||
methods: { |
||||
closeDialog() { |
||||
this.inspectionShow = false; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
methods: { |
||||
searchChange(params, done){ |
||||
this.query = params |
||||
this.page.currentPage = 1; |
||||
this.onLoad() |
||||
done() |
||||
}, |
||||
searchReset(){ |
||||
this.query = {} |
||||
this.onLoad() |
||||
}, |
||||
currentChange(currentPage){ |
||||
this.page.currentPage = currentPage; |
||||
}, |
||||
sizeChange(pageSize){ |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
warehousing() { |
||||
searchChange(params, done) { |
||||
this.query = params; |
||||
this.page.currentPage = 1; |
||||
this.onLoad(); |
||||
done(); |
||||
}, |
||||
searchReset() { |
||||
this.query = {}; |
||||
this.onLoad(); |
||||
}, |
||||
currentChange(currentPage) { |
||||
this.page.currentPage = currentPage; |
||||
}, |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
warehousing() {}, |
||||
warehousingLog() {}, |
||||
searchData(type) { |
||||
this.query.expireStatus = type; |
||||
this.onLoad(); |
||||
}, |
||||
// 到期送检弹框 |
||||
allocationFun() { |
||||
if (this.selectionList.length === 0) { |
||||
this.$message.warning('请选择至少一条数据'); |
||||
return; |
||||
} |
||||
const allUninspected = this.selectionList.every(item => item.applyFor === false); |
||||
|
||||
}, |
||||
warehousingLog() { |
||||
if (!allUninspected) { |
||||
this.$message.error('只能对“未送检”的数据进行批量送检,请检查选中项'); |
||||
return; |
||||
} |
||||
this.selectionList.forEach(item => { |
||||
item.esDept = '' //送检部门名称 |
||||
item.esQty = '' //送检数量 |
||||
item.esDeptId='' //送检部门id |
||||
}); |
||||
this.rowData = this.selectionList |
||||
this.inspectionShow = true |
||||
|
||||
}, |
||||
searchData(type){ |
||||
this.query.expireStatus = type |
||||
this.onLoad() |
||||
}, |
||||
allocationFun(arId) { |
||||
// this.$confirm('是否确认调拨', '提示', { |
||||
// confirmButtonText: '确认', |
||||
// cancelButtonText: '取消', |
||||
// type: 'warning' |
||||
// }) |
||||
// .then(() => { |
||||
// const obj = { list: [] }; |
||||
// if (arId == null) { |
||||
// this.selectionArr.forEach(item => { |
||||
// obj.list.push(item.arId); |
||||
// }); |
||||
// } else { |
||||
// obj.list.push(arId); |
||||
// } |
||||
// // this.$ajax.post('stAllotRecord/updateLocation', obj).then(res => { |
||||
// // if (res.code === 0) { |
||||
// // this.$message.success(this.$t('store.allocationOk')); |
||||
// // this.$refs.myTable.load(); |
||||
// // } |
||||
// // }); |
||||
// }) |
||||
// .catch(() => { |
||||
// this.$message.info( |
||||
// this.$t('global.canceled') + this.$t('store.allocation') |
||||
// ); |
||||
// }); |
||||
}, |
||||
handleDelete() { |
||||
if (this.selectionList.length === 0) { |
||||
this.$message.warning('请选择至少一条数据'); |
||||
return; |
||||
} |
||||
this.$confirm('确定将选择数据删除?', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
}) |
||||
}, |
||||
// 多选 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
onLoad() { |
||||
this.loading = true |
||||
getList({ |
||||
current:this.page.currentPage, |
||||
size:this.page.pageSize, |
||||
...this.query |
||||
}).then(res =>{ |
||||
this.data = res.data.data.records |
||||
console.log('data-----------',this.data) |
||||
this.page.total = res.data.data.total |
||||
this.loading = false |
||||
}) |
||||
// this.data = [ |
||||
// { |
||||
// "wsCode": "34544554", |
||||
// "goodsCode": "876788", |
||||
// "goodsName": "物料一", |
||||
// "shName": "库房一", |
||||
// "location": "仓库名称(仓库编号)", |
||||
// "stovePiNo": "87889", |
||||
// "checkCode": "8767677", |
||||
// "quantityLevel": "一級", |
||||
// "wsQty": 89, |
||||
// "wsDept": "质量三部", |
||||
// "wsTime": "2025-10-09", |
||||
// "userName": "检验人", |
||||
// "status": "送检中", |
||||
// "statusTitle": "已完成" |
||||
// }, |
||||
// { |
||||
// "wsCode": "34544554", |
||||
// "goodsCode": "876788", |
||||
// "goodsName": "物料一", |
||||
// "shName": "库房一", |
||||
// "location": "位置", |
||||
// "stovePiNo": "87889", |
||||
// "checkCode": "8767677", |
||||
// "quantityLevel": "一級", |
||||
// "wsQty": 89, |
||||
// "wsDept": "质量三部", |
||||
// "wsTime": "2025-10-09", |
||||
// "userName": "检验人", |
||||
// "status": "送检中", |
||||
// "statusTitle": "已完成" |
||||
// } |
||||
// ] |
||||
// this.page.total = this.data.length |
||||
// this.loading = false |
||||
// setTimeout(() => { |
||||
// this.selectionClear() |
||||
// }, 500) |
||||
} |
||||
} |
||||
} |
||||
// this.$confirm('是否确认调拨', '提示', { |
||||
// confirmButtonText: '确认', |
||||
// cancelButtonText: '取消', |
||||
// type: 'warning' |
||||
// }) |
||||
// .then(() => { |
||||
// const obj = { list: [] }; |
||||
// if (arId == null) { |
||||
// this.selectionArr.forEach(item => { |
||||
// obj.list.push(item.arId); |
||||
// }); |
||||
// } else { |
||||
// obj.list.push(arId); |
||||
// } |
||||
// // this.$ajax.post('stAllotRecord/updateLocation', obj).then(res => { |
||||
// // if (res.code === 0) { |
||||
// // this.$message.success(this.$t('store.allocationOk')); |
||||
// // this.$refs.myTable.load(); |
||||
// // } |
||||
// // }); |
||||
// }) |
||||
// .catch(() => { |
||||
// this.$message.info( |
||||
// this.$t('global.canceled') + this.$t('store.allocation') |
||||
// ); |
||||
// }); |
||||
}, |
||||
handleDelete() { |
||||
if (this.selectionList.length === 0) { |
||||
this.$message.warning('请选择至少一条数据'); |
||||
return; |
||||
} |
||||
this.$confirm('确定将选择数据删除?', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => {}); |
||||
}, |
||||
// 多选 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
onLoad() { |
||||
this.loading = true; |
||||
getList({ |
||||
current: this.page.currentPage, |
||||
size: this.page.pageSize, |
||||
...this.query, |
||||
}).then(res => { |
||||
this.data = res.data.data.records; |
||||
this.page.total = res.data.data.total; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
Loading…
Reference in new issue