中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

876 lines
34 KiB

7 months ago
<template>
<basic-container>
<avue-crud :option="option" :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">
6 months ago
<!-- <template #leCode="{ row }">{{ row.stLend.leCode }}</template> -->
<!-- <template #goodsCode="{ row }">{{ row.stLend.stRealtimeStock.coGoods.goodsCode }}</template>
7 months ago
<template #goodsName="{ row }">{{ row.stLend.stRealtimeStock.coGoods.goodsName }}</template>
<template #piNo="{ row }">{{ row.stLend.stRealtimeStock.piNo }}</template>
<template #shName="{ row }">{{ row.stLend.stRealtimeStock.coStorehouse.shName }}</template>
<template #location="{ row }">{{ row.stLend.stRealtimeStock.storageLocation.location }}</template>
<template #quantity="{ row }">{{ row.stLend.quantity }}</template>
<template #returnQty="{ row }">{{ row.stLend.returnQty }}</template>
<template #unitName="{ row }">{{ row.stLend.stRealtimeStock.coGoods.unitName }}</template>
<template #leDate="{ row }">{{ row.stLend.leDate }}</template>
<template #leReturnDate="{ row }">{{ row.stLend.leReturnDate }}</template>
<template #deptName="{ row }">{{ row.stLend.pfDepartment.deptName }}</template>
<template #userName="{ row }">{{ row.stLend.leMan.userName }}</template>
<template #createMan="{ row }">{{ row.createMan.userName }}</template>
<template #curStatus="{ row }">
{{ row.stLend.curStatus == 20 ? '已借出' : row.stLend.curStatus == 24 ?
'部分归还' : row.stLend.curStatus == 25 ? '已归还' : "新建" }}
6 months ago
</template> -->
7 months ago
<template #menu-left>
6 months ago
<el-button type="primary" @click="handleAdd">新增</el-button>
<el-button type="primary" @click="jichu()">批量借出</el-button>
<el-button type="primary" @click="handleReturn">批量归还</el-button>
</template>
<template #menu="scope">
<el-button type="text" @click="handleEdit(scope.row)">修改</el-button>
<!-- 删除 待借出 可以删除 其余禁止删除 -->
7 months ago
</template>
</avue-crud>
6 months ago
<el-dialog title="批量归还" append-to-body v-model="returnDialog" width="50%">
7 months ago
<el-button plain type="danger" @click="remove">删除选择行</el-button>
6 months ago
<!-- <el-button type="primary" @click="handleSave">保存</el-button> -->
7 months ago
<el-table :data="returnData" style="margin-top: 10px;">
<el-table-column type="selection"></el-table-column>
6 months ago
<el-table-column label="物料编码" prop="goodsCode" align="center"></el-table-column>
<el-table-column label="合格数" prop="passQty">
<template #default="scope">
<el-input-number v-model="num" :min="1" :max="10" controls-position="right"
@change="handleChange" />
</template>
</el-table-column>
<el-table-column label="丢失数" prop="loseQty" align="center">
<template #default="scope">
<el-input-number v-model="num" :min="1" :max="10" controls-position="right"
@change="handleChange" />
</template>
</el-table-column>
<!-- 如果有报废数量自动生成一条报废记录 然后发送给工艺员角色审批 待报废 已报废(审批通过) -->
<el-table-column label="报废数" prop="loseQty" align="center">
<template #default="scope">
<el-input-number v-model="num" :min="1" :max="10" controls-position="right"
@change="handleChange" />
</template>
</el-table-column>
<el-table-column label="使用次数" prop="useNumber" align="center">
<template #default="scope">
<el-input-number v-model="num" :min="1" :max="10" controls-position="right"
@change="handleChange" />
</template>
</el-table-column>
7 months ago
</el-table>
6 months ago
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
7 months ago
</el-dialog>
6 months ago
<!-- 借出 -->
<borrowDialog v-if="isOpen" :showDialog="isOpen" @closeDialog="closeDialog" :moldAddMore="moldAddMore">
</borrowDialog>
7 months ago
</basic-container>
</template>
<script>
6 months ago
import borrowDialog from './components/borrowDialog.vue'
7 months ago
export default {
6 months ago
components: {
borrowDialog
},
7 months ago
data() {
return {
loading: false,
data: [],
form: {},
6 months ago
returnDialog: false,
7 months ago
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
6 months ago
returnData: [{
goodsCode: '9898989'
}],
7 months ago
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,
6 months ago
viewBtn: false,
editBtn: false,
7 months ago
delBtn: true,
6 months ago
addBtn: false,
7 months ago
editBtnText: '修改',
6 months ago
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
7 months ago
viewBtnText: '详情',
labelWidth: 150,
6 months ago
menuWidth: 120,
7 months ago
dialogWidth: 1500,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true,
6 months ago
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
align: 'center',
7 months ago
column: [
{
label: '单据号',
prop: 'leCode',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 12,
7 months ago
search: true,
6 months ago
searchOrder: 20,
7 months ago
rules: [
{
required: true,
message: '请输入单据号',
trigger: 'click',
},
],
},
{
label: '物料编号',
prop: 'goodsCode',
addDisplay: true,
editDisplay: false,
6 months ago
order: 11,
7 months ago
span: 6,
width: 200,
search: true,
6 months ago
searchOrder: 18,
7 months ago
rules: [
{
required: true,
message: '请输入物料编号',
trigger: 'click',
},
],
},
{
label: '物料名称',
prop: 'goodsName',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 8,
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入物料名称',
trigger: 'click',
},
],
},
{
label: '批号',
prop: 'piNo',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 6,
7 months ago
search: true,
rules: [
{
required: true,
message: '请输入批号',
trigger: 'click',
},
],
},
{
label: '库房号',
prop: 'shName',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
search: true,
rules: [
{
required: true,
message: '请输入库房号',
trigger: 'click',
},
],
},
{
label: '库位号',
prop: 'location',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
search: true,
rules: [
{
required: true,
message: '请输入库位号',
trigger: 'click',
},
],
},
6 months ago
{
label: '库存量',
prop: 'stockNum',
addDisplay: true,
addDisabled: true,
editDisplay: false,
span: 6,
width: 200,
search: false,
rules: [
{
required: true,
message: '请输入库存量',
trigger: 'click',
},
],
},
{
label: '可用库存',
prop: 'useQuantity',
addDisplay: true,
addDisabled: true,
editDisplay: false,
span: 6,
width: 200,
search: false,
rules: [
{
required: true,
message: '请输入可用库存',
trigger: 'click',
},
],
},
7 months ago
{
label: '借出数量',
prop: 'quantity',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 10,
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入借出数量',
trigger: 'click',
},
],
},
{
label: '退库数量',
prop: 'returnQty',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入退库数量',
trigger: 'click',
},
],
},
{
label: '单位',
prop: 'unitName',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 2,
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入单位',
trigger: 'click',
},
],
},
{
label: '借出时间',
prop: 'leDate',
addDisplay: true,
editDisplay: false,
6 months ago
type: "date",
searchRange: true,
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
7 months ago
span: 6,
width: 200,
order: 16,
search: true,
rules: [
{
required: true,
message: '请输入借出时间',
trigger: 'click',
},
],
},
{
label: '借出仓库',
prop: 'shId',
type: 'select',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
order: 15,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入借出仓库',
trigger: 'click',
},
],
dicData: [
{ label: "仓库一", value: '001' },
{ label: "仓库二", value: '002' },
]
},
{
label: '计划归还',
prop: 'leReturnDate',
6 months ago
order: 9,
type: 'date',
7 months ago
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入计划归还',
trigger: 'click',
},
],
},
{
label: '借用部门',
prop: 'deptName',
type: 'select',
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
order: 14,
search: true,
rules: [
{
required: true,
message: '请输入借用部门',
trigger: 'click',
},
],
6 months ago
prop: {
label: "deptName",
value: 'deptCode'
7 months ago
},
dicData: [
{
"appLink": null,
"createTime": "2022-08-31",
"deleted": false,
"deptCode": "001",
"deptId": 1,
"deptName": "MES开发部",
"deptType": 1,
"deptTypeTitle": "厂",
"keyValue": 1,
"memo": null,
"orders": "00",
"parentDeptId": null,
"parentPath": null,
"ucDeptId": null,
"updateTime": "2022-08-31 16:32:46"
},
{
"appLink": null,
"createTime": "2023-02-06",
"deleted": false,
"deptCode": "3400",
"deptId": 41,
"deptName": "热表分厂",
"deptType": 1,
"deptTypeTitle": "厂",
"keyValue": 41,
"memo": null,
"orders": "1",
"parentDeptId": null,
"parentPath": null,
"ucDeptId": null,
"updateTime": "2023-02-06 10:25:08"
},
{
"appLink": null,
"createTime": "2023-02-06",
"deleted": false,
"deptCode": "01",
"deptId": 42,
"deptName": "化学镀镍",
"deptType": 1,
"deptTypeTitle": "厂",
"keyValue": 42,
"memo": null,
"orders": "1",
"parentDeptId": 41,
"parentPath": null,
"ucDeptId": null,
"updateTime": "2023-02-06 10:26:13"
},
]
},
{
label: '借用人',
6 months ago
prop: 'leReturnUser',
type: 'select',
7 months ago
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 13,
7 months ago
search: true,
rules: [
{
required: true,
message: '请输入借用人',
trigger: 'click',
},
],
6 months ago
dicData: [
{ userId: 1, userName: "admin" },
{ userId: 61, userName: "09391" },
{ userId: 62, userName: "03764" },
7 months ago
]
},
{
label: '本次归还合格数量',
prop: 'passQty',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入本次归还合格数量',
trigger: 'click',
},
],
},
{
label: '本次归还丢失数',
prop: 'loseQty',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入本次归还丢失数',
trigger: 'click',
},
],
},
{
label: '本次归还报废数',
prop: 'bfQty',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入本次归还报废数',
trigger: 'click',
},
],
},
6 months ago
// {
// label: '本次归还续借数',
// prop: 'renewQty',
// addDisplay: false,
// editDisplay: false,
// span: 6,
// width: 200,
// search: false,
// rules: [
// {
// required: true,
// message: '请输入本次归还续借数',
// trigger: 'click',
// },
// ],
// },
7 months ago
{
label: '本次归还人',
prop: 'createMan',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
search: true,
6 months ago
searchLabelWidth: 90,
7 months ago
rules: [
{
required: true,
message: '请输入本次归还人',
trigger: 'click',
},
],
},
{
label: '本次使用次数',
prop: 'useNumber',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
message: '请输入本次使用次数',
trigger: 'click',
},
],
},
{
label: '本次归还时间',
prop: 'createTime',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
6 months ago
type: 'date',
searchRange: true,
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
7 months ago
search: true,
6 months ago
searchLabelWidth: 100,
7 months ago
rules: [
{
required: true,
message: '请输入本次归还时间',
trigger: 'click',
},
],
},
{
label: '状态',
prop: 'curStatus',
addDisplay: false,
editDisplay: false,
span: 6,
width: 200,
search: true,
6 months ago
type: 'select',
searchOrder: 18,
dicData: [
{
label: '待借出',
value: 1
},
{
label: '待归还',
value: 1
},
{
label: '部分归还',
value: 4
},
{
label: '已归还',
value: 3
},
],
7 months ago
rules: [
{
required: true,
message: '请输入状态',
trigger: 'click',
},
],
},
{
6 months ago
label: '是否报废',
7 months ago
prop: 'curStatus',
6 months ago
addDisplay: false,
7 months ago
editDisplay: false,
span: 6,
width: 200,
search: true,
6 months ago
type: 'select',
searchOrder: 17,
hide:true,
dicData: [
7 months ago
{
6 months ago
label: '是',
value: 1
7 months ago
},
6 months ago
{
label: '否',
value: 1
},
7 months ago
],
rules: [
{
required: true,
6 months ago
message: '请输入状态',
7 months ago
trigger: 'click',
},
],
},
{
6 months ago
label: '备注',
prop: 'curStatus',
type: 'textarea',
7 months ago
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
order: 1,
search: false,
7 months ago
rules: [
{
required: true,
6 months ago
message: '请输入备注',
7 months ago
trigger: 'click',
},
],
},
{
6 months ago
label: '型号/牌号',
prop: 'specifications',
7 months ago
addDisplay: true,
editDisplay: false,
span: 6,
width: 200,
6 months ago
search: false,
7 months ago
rules: [
{
required: true,
6 months ago
message: '请输入型号/牌号',
7 months ago
trigger: 'click',
},
],
},
6 months ago
7 months ago
]
},
6 months ago
isOpen: false,
moldAddMore: false,
7 months ago
}
},
mounted() {
},
methods: {
6 months ago
jichu() {
this.$confirm('确定将选择数据批量借出?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
callback();
});
},
handleEdit() {
this.isOpen = true
this.moldAddMore = false
},
// 借用
handleAdd() {
this.isOpen = true
this.moldAddMore = true
},
closeDialog() {
this.isOpen = false
},
handleReturn() {
7 months ago
this.returnDialog = true
},
onLoad() {
6 months ago
this.data = [
{
"leCode": "OT202407147982350",
"goodsCode": "89878809",
"goodsName": "物料一",
"shName": "989899",
"location": "库位1",
"returnQty": 8,
"unitName": "單位",
"leDate": "2025-09-11",
"shId": "45",
"leReturnDate": "2025-10-01",
"deptName": "34005",
"leReturnUser": "借用人",
"passQty": 89,
"loseQty": 4,
"bfQty": 7,
"renewQty": 5,
"createMan": "归还人",
"useNumber": 7,
"createTime": "2025-10-9",
"specifications": "344",
"stockNum": 90,
"useQuantity": 8,
"buyCode": "OT202407147982350",
"cccList": null,
"curStatus": -1,
"enrtydate": null,
"invadjCode": "C20240725148120387",
"invadjMoney": 0.0,
"inviefdat": "2026-07-01",
"invysqty": "4.0",
"keyValue": 1167,
"piNo": "090988",
"planBuyMan": null,
"planDeclareMan": null,
"plnarea": "洛阳新区",
"prtdesc": "氧化银钾",
"prtinfo": "1000g / 袋",
"prtlotno": null,
"prtno": "04-05-025",
"prtrepno": null,
"prtum": "千克",
"pushHouse": null,
"pushQuantity": 9,
"qutno": "JF-2407-XC-5344",
"remark": "热表 mes 额外需求",
"rouclp": "-",
"splyName": "热表分厂",
"srId": 1167,
"storarea": "洛阳新区",
"stovePiNo": null,
"validdat": "2024-07-31",
"warctlr": "吕阳",
"warlocno": "G010203",
"warno": "020060JY"
},
{
"leCode": "OT2024989879",
"goodsCode": "89878809",
"goodsName": "物料2",
"shName": "989899",
"location": "库位2",
"returnQty": 8,
"unitName": "單位",
"leDate": "2025-09-11",
"shId": "45",
"leReturnDate": "2025-10-01",
"deptName": "34005",
"leReturnUser": "借用人",
"passQty": 89,
"loseQty": 4,
"bfQty": 7,
"renewQty": 5,
"createMan": "归还人",
"useNumber": 7,
"createTime": "2025-10-9",
"specifications": "344",
"stockNum": 90,
"useQuantity": 8,
"buyCode": "OT202407147982350",
"cccList": null,
"curStatus": -1,
"enrtydate": null,
"invadjCode": "C20240725148120387",
"invadjMoney": 0.0,
"inviefdat": "2026-07-01",
"invysqty": "4.0",
"keyValue": 1167,
"piNo": "090988",
"planBuyMan": null,
"planDeclareMan": null,
"plnarea": "洛阳新区",
"prtdesc": "氧化银钾",
"prtinfo": "1000g / 袋",
"prtlotno": null,
"prtno": "04-05-025",
"prtrepno": null,
"prtum": "千克",
"pushHouse": null,
"pushQuantity": 9,
"qutno": "JF-2407-XC-5344",
"remark": "热表 mes 额外需求",
"rouclp": "-",
"splyName": "热表分厂",
"srId": 1167,
"storarea": "洛阳新区",
"stovePiNo": null,
"validdat": "2024-07-31",
"warctlr": "吕阳",
"warlocno": "G010203",
"warno": "020060JY"
},
]
7 months ago
this.page.total = this.data.length
}
}
}
</script>
<style></style>