fix: 1417 设备绑定编码时,绑定几台设备重复展示几次数据
This commit is contained in:
parent
101e0d7ef6
commit
fc4e97d591
|
|
@ -363,3 +363,12 @@ export function getWholeSetDetails(query) {
|
||||||
params: query,
|
params: query,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查看绑定编码详情
|
||||||
|
export function getBindCodeDetails(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseMacode/details',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -65,6 +65,14 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-view"
|
||||||
|
:disabled="scope.row.bindNum == 0"
|
||||||
|
@click="handleBindDetails(scope.row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -88,7 +96,7 @@
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
|
||||||
<el-row :gutter="24" class="mb8">
|
<el-row :gutter="24" class="mb8">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="78px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="78px" v-if="!isDetail">
|
||||||
<el-input v-model="form.typeId" disabled v-show="false" />
|
<el-input v-model="form.typeId" disabled v-show="false" />
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item label="编码前缀" prop="exCode">
|
<el-form-item label="编码前缀" prop="exCode">
|
||||||
|
|
@ -145,18 +153,21 @@
|
||||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true">
|
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
|
v-if="!isDetail"
|
||||||
v-model="scope.row.maCode"
|
v-model="scope.row.maCode"
|
||||||
:disabled="scope.row.statusFlag == 0"
|
:disabled="scope.row.statusFlag == 0"
|
||||||
οninput="value=value.replace(/[^0-9.]/g,'')"
|
οninput="value=value.replace(/[^0-9.]/g,'')"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
<span v-else>{{ scope.row.maCode }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="固定资产编码" align="center" prop="assetsCode">
|
<el-table-column label="固定资产编码" align="center" prop="assetsCode">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.assetsCode" v-show="form.fixCode == '0'" maxlength="50"></el-input>
|
<el-input v-model="scope.row.assetsCode" v-if="!isDetail" v-show="form.fixCode == '0'" maxlength="50"></el-input>
|
||||||
|
<span v-else>{{ scope.row.assetsCode }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" v-if="!isDetail">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="delCode(scope.row)">删除</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="delCode(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -164,7 +175,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm" v-if="!isDetail">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -187,6 +198,7 @@ import {
|
||||||
makeEquipmentNumber,
|
makeEquipmentNumber,
|
||||||
editPurchaseMacode,
|
editPurchaseMacode,
|
||||||
delMacodeList,
|
delMacodeList,
|
||||||
|
getBindCodeDetails
|
||||||
} from '@/api/store/newBuy'
|
} from '@/api/store/newBuy'
|
||||||
|
|
||||||
import { getTypeList } from '@/api/store/warehousing'
|
import { getTypeList } from '@/api/store/warehousing'
|
||||||
|
|
@ -250,6 +262,7 @@ export default {
|
||||||
// { required: true, message: "设备编号不能为空", trigger: "blur" }
|
// { required: true, message: "设备编号不能为空", trigger: "blur" }
|
||||||
// ],
|
// ],
|
||||||
},
|
},
|
||||||
|
isDetail: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -338,6 +351,7 @@ export default {
|
||||||
this.codeList = []
|
this.codeList = []
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = '生成编码'
|
this.title = '生成编码'
|
||||||
|
this.isDetail = false
|
||||||
// let param = {
|
// let param = {
|
||||||
// taskId:this.taskId,
|
// taskId:this.taskId,
|
||||||
// typeId:row.typeId,
|
// typeId:row.typeId,
|
||||||
|
|
@ -484,6 +498,16 @@ export default {
|
||||||
const obj = { path: '/store/newBuy/newDevicesList' }
|
const obj = { path: '/store/newBuy/newDevicesList' }
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
},
|
},
|
||||||
|
async handleBindDetails(row) {
|
||||||
|
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId);
|
||||||
|
this.open = true
|
||||||
|
this.isDetail = true
|
||||||
|
this.title = '编码绑定详情'
|
||||||
|
this.codeList = []
|
||||||
|
const res = await getBindCodeDetails({taskId: row.taskId})
|
||||||
|
console.log('🚀 ~ handleBindDetails ~ res:', res);
|
||||||
|
this.codeList = res.data
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -629,6 +629,8 @@
|
||||||
this.$tab.closeOpenPage({
|
this.$tab.closeOpenPage({
|
||||||
path: '/store/newBuy/newDevicesCode',
|
path: '/store/newBuy/newDevicesCode',
|
||||||
query,
|
query,
|
||||||
|
}).then(() => {
|
||||||
|
this.$tab.refreshPage()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue