编码退料-完好,损坏数量
This commit is contained in:
parent
81707a15f7
commit
7dfc37fa54
|
|
@ -1,6 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :rules="queryRules" :inline="true" v-show="showSearch" label-width="100px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:rules="queryRules"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="退料单位" prop="unitId">
|
<el-form-item label="退料单位" prop="unitId">
|
||||||
<treeselect
|
<treeselect
|
||||||
|
|
@ -78,10 +86,10 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24" style="display: flex;align-items: center;">
|
<el-row :gutter="24" style="display: flex; align-items: center">
|
||||||
<el-col :span="1.5" style="text-align: center;margin-left: 20px;">
|
<el-col :span="1.5" style="text-align: center; margin-left: 20px">
|
||||||
<span style="color: red;">*</span>
|
<span style="color: red">*</span>
|
||||||
<span style="font-size: 14px;font-weight: 600;color: #606266;">物品类型</span>
|
<span style="font-size: 14px; font-weight: 600; color: #606266">物品类型</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -107,9 +115,7 @@
|
||||||
:data-key="item.typeId"
|
:data-key="item.typeId"
|
||||||
>
|
>
|
||||||
<span v-html="highlightText(item.fullPath, searchKeyword)"></span>
|
<span v-html="highlightText(item.fullPath, searchKeyword)"></span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">
|
<span style="float: right; color: #8492a6; font-size: 13px">出库:{{ item.num }}</span>
|
||||||
出库:{{ item.num }}
|
|
||||||
</span>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -152,7 +158,8 @@
|
||||||
v-model="queryParams.remark"
|
v-model="queryParams.remark"
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
clearable
|
clearable
|
||||||
rows="2" maxlength="100"
|
rows="2"
|
||||||
|
maxlength="100"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
|
|
@ -203,9 +210,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退料数量" align="center" prop="preNum" min-width="100">
|
<el-table-column label="退料数量" align="center" prop="preNum" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="color: rgb(2, 167, 240)"
|
<div
|
||||||
|
style="color: rgb(2, 167, 240)"
|
||||||
@click="openAddCode(scope.row)"
|
@click="openAddCode(scope.row)"
|
||||||
v-if="scope.row.manageType == 0">
|
v-if="scope.row.manageType == 0"
|
||||||
|
>
|
||||||
添加编码
|
添加编码
|
||||||
</div>
|
</div>
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -228,6 +237,7 @@
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@input="changeNum(scope.row)"
|
@input="changeNum(scope.row)"
|
||||||
|
:disabled="scope.row.manageType == 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -239,6 +249,7 @@
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@input="changeNum(scope.row)"
|
@input="changeNum(scope.row)"
|
||||||
|
:disabled="scope.row.manageType == 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -284,7 +295,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="picturePreview(scope.row)"
|
@click="picturePreview(scope.row)"
|
||||||
v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0"fileName
|
v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0"
|
||||||
|
fileName
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -316,27 +328,59 @@
|
||||||
<el-button type="primary" size="mini" @click="handleAddCode">添加编码</el-button>
|
<el-button type="primary" size="mini" @click="handleAddCode">添加编码</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row> -->
|
</el-row> -->
|
||||||
<el-table :data="machineList" width="100%" ref="codeTableList" height="450px" row-key="maId" @selection-change="codeSelectionChange">
|
<el-table
|
||||||
|
:data="machineList"
|
||||||
|
width="100%"
|
||||||
|
ref="codeTableList"
|
||||||
|
height="450px"
|
||||||
|
row-key="maId"
|
||||||
|
@selection-change="codeSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||||
<el-table-column label="类型名称" prop="typeName" align="center" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="规格型号" prop="materialName" align="center" :show-overflow-tooltip="true"></el-table-column>
|
label="类型名称"
|
||||||
<el-table-column label="设备编码" prop="maCode" align="center" :show-overflow-tooltip="true"></el-table-column>
|
prop="typeName"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="规格型号"
|
||||||
|
prop="materialName"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="设备编码"
|
||||||
|
prop="maCode"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="设备状态" prop="maStatus" align="center" :show-overflow-tooltip="true">
|
<el-table-column label="设备状态" prop="maStatus" align="center" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus" />
|
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="外观判定11" prop="apDetection" align="center" width="150" :show-overflow-tooltip="true">
|
<el-table-column
|
||||||
|
label="外观判定"
|
||||||
|
prop="apDetection"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<!-- <el-input
|
||||||
v-model.number="scope.row.apDetection"
|
v-model.number="scope.row.apDetection"
|
||||||
placeholder="外观判定"
|
placeholder="外观判定"
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
type="text"
|
type="text"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/> -->
|
||||||
|
<el-radio-group v-model="scope.row.apDetection">
|
||||||
|
<el-radio label="1">完好</el-radio>
|
||||||
|
<el-radio label="0">损坏</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="附件" align="center" width="120" :show-overflow-tooltip="true">
|
<el-table-column label="附件" align="center" width="120" :show-overflow-tooltip="true">
|
||||||
|
|
@ -354,13 +398,16 @@
|
||||||
>
|
>
|
||||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">上传</el-button>
|
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)"
|
<el-button
|
||||||
v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0">
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="picturePreview(scope.row)"
|
||||||
|
v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0"
|
||||||
|
>
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
label="文件名称"
|
label="文件名称"
|
||||||
|
|
@ -580,7 +627,8 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.GetUnitData()
|
this.GetUnitData()
|
||||||
this.GetProData()
|
this.GetProData()
|
||||||
if (this.backId) { //编辑
|
if (this.backId) {
|
||||||
|
//编辑
|
||||||
this.rowId = this.backId
|
this.rowId = this.backId
|
||||||
this.GetViewByApply()
|
this.GetViewByApply()
|
||||||
}
|
}
|
||||||
|
|
@ -605,12 +653,14 @@ export default {
|
||||||
}
|
}
|
||||||
// 不能大于preNum
|
// 不能大于preNum
|
||||||
if (row.badNum + row.goodNum > row.preNum) {
|
if (row.badNum + row.goodNum > row.preNum) {
|
||||||
console.log('🚀 ~ changeNum ~ row.badNum + row.goodNum > row.preNum:', row.badNum + row.goodNum > row.preNum)
|
console.log(
|
||||||
|
'🚀 ~ changeNum ~ row.badNum + row.goodNum > row.preNum:',
|
||||||
|
row.badNum + row.goodNum > row.preNum
|
||||||
|
)
|
||||||
this.$message.error('完好数量和损坏数量之和不能大于退料数量')
|
this.$message.error('完好数量和损坏数量之和不能大于退料数量')
|
||||||
row.badNum = 0
|
row.badNum = 0
|
||||||
row.goodNum = 0
|
row.goodNum = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 转换菜单数据结构 */
|
/** 转换菜单数据结构 */
|
||||||
normalizer(node) {
|
normalizer(node) {
|
||||||
|
|
@ -752,11 +802,11 @@ export default {
|
||||||
...typeData,
|
...typeData,
|
||||||
preNum: 0,
|
preNum: 0,
|
||||||
typeModel: typeData.typeName,
|
typeModel: typeData.typeName,
|
||||||
typeName:typeData.specificationType,
|
typeName: typeData.specificationType,
|
||||||
apDetection: '',
|
apDetection: '',
|
||||||
remark:'',
|
remark: '',
|
||||||
maCodeList:[],
|
maCodeList: [],
|
||||||
bmFileInfos:[]
|
bmFileInfos: []
|
||||||
})
|
})
|
||||||
this.deviceType.push(lastSelected)
|
this.deviceType.push(lastSelected)
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|
@ -817,7 +867,7 @@ export default {
|
||||||
async GetViewByApply(params) {
|
async GetViewByApply(params) {
|
||||||
const res = await getBackApplyInfo(this.rowId)
|
const res = await getBackApplyInfo(this.rowId)
|
||||||
console.log(res)
|
console.log(res)
|
||||||
const data = res.data;
|
const data = res.data
|
||||||
this.queryParams.unitId = data.backApplyInfo.unitId
|
this.queryParams.unitId = data.backApplyInfo.unitId
|
||||||
// this.unitId = this.treeParentsById(this.unitList, this.queryParams.unitId)
|
// this.unitId = this.treeParentsById(this.unitList, this.queryParams.unitId)
|
||||||
this.GetProData()
|
this.GetProData()
|
||||||
|
|
@ -829,8 +879,10 @@ export default {
|
||||||
this.queryParams.backPerson = data.backApplyInfo.backPerson
|
this.queryParams.backPerson = data.backApplyInfo.backPerson
|
||||||
this.queryParams.agreementId = data.backApplyInfo.agreementId
|
this.queryParams.agreementId = data.backApplyInfo.agreementId
|
||||||
this.queryParams.remark = data.backApplyInfo.remark
|
this.queryParams.remark = data.backApplyInfo.remark
|
||||||
this.equipmentList = data.backApplyDetailsList;
|
this.equipmentList = data.backApplyDetailsList
|
||||||
this.equipmentList.forEach(item=>{item.tempMaCodeList=item.maCodeList})
|
this.equipmentList.forEach(item => {
|
||||||
|
item.tempMaCodeList = item.maCodeList
|
||||||
|
})
|
||||||
this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
|
this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
|
||||||
},
|
},
|
||||||
//单位,工程树结构数据获取父
|
//单位,工程树结构数据获取父
|
||||||
|
|
@ -1054,13 +1106,13 @@ export default {
|
||||||
this.machineList = res.data
|
this.machineList = res.data
|
||||||
this.machineList.forEach(item => {
|
this.machineList.forEach(item => {
|
||||||
item.bmFileInfos = []
|
item.bmFileInfos = []
|
||||||
item.apDetection = ''
|
item.apDetection = '1'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//编码类型-弹窗
|
//编码类型-弹窗
|
||||||
async openAddCode(row) {
|
async openAddCode(row) {
|
||||||
this.rowData = row;
|
this.rowData = row
|
||||||
await this.getMachineById(row.typeId)
|
await this.getMachineById(row.typeId)
|
||||||
// this.maId=""
|
// this.maId=""
|
||||||
if (this.rowData.maCodeList && this.rowData.maCodeList.length > 0) {
|
if (this.rowData.maCodeList && this.rowData.maCodeList.length > 0) {
|
||||||
|
|
@ -1074,7 +1126,7 @@ export default {
|
||||||
// this.$refs.codeTableList.toggleRowSelection(item, true)
|
// this.$refs.codeTableList.toggleRowSelection(item, true)
|
||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
this.maCodeList = this.rowData.maCodeList;
|
this.maCodeList = this.rowData.maCodeList
|
||||||
this.machineList.forEach(item => {
|
this.machineList.forEach(item => {
|
||||||
this.maCodeList.forEach(sub => {
|
this.maCodeList.forEach(sub => {
|
||||||
if (sub.maId == item.maId) {
|
if (sub.maId == item.maId) {
|
||||||
|
|
@ -1086,7 +1138,6 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//新增回显勾选
|
//新增回显勾选
|
||||||
// console.log("新增")
|
// console.log("新增")
|
||||||
|
|
@ -1147,8 +1198,11 @@ export default {
|
||||||
saveDevCode() {
|
saveDevCode() {
|
||||||
console.log(this.rowData)
|
console.log(this.rowData)
|
||||||
console.log(this.maCodeList)
|
console.log(this.maCodeList)
|
||||||
this.rowData.maCodeList = this.maCodeList;
|
this.rowData.maCodeList = this.maCodeList
|
||||||
this.rowData.preNum = this.maCodeList.length;
|
this.rowData.preNum = this.maCodeList.length
|
||||||
|
// this.rowData.goodNum = this.maCodeList 中 apDetection 为 1 的数量
|
||||||
|
this.rowData.goodNum = this.maCodeList.filter(item => item.apDetection === '1').length
|
||||||
|
this.rowData.badNum = this.maCodeList.filter(item => item.apDetection === '0').length
|
||||||
this.open = false
|
this.open = false
|
||||||
console.log(this.equipmentList)
|
console.log(this.equipmentList)
|
||||||
},
|
},
|
||||||
|
|
@ -1199,10 +1253,17 @@ export default {
|
||||||
console.log(row.bmFileInfos)
|
console.log(row.bmFileInfos)
|
||||||
if (row.bmFileInfos.length > 0) {
|
if (row.bmFileInfos.length > 0) {
|
||||||
let file = row.bmFileInfos[0]
|
let file = row.bmFileInfos[0]
|
||||||
this.dialogImageUrl = file.url.replaceAll('#','%23')
|
this.dialogImageUrl = file.url.replaceAll('#', '%23')
|
||||||
const parts = file.name.split('.')
|
const parts = file.name.split('.')
|
||||||
const extension = parts.pop()
|
const extension = parts.pop()
|
||||||
if (extension === 'doc' || extension === 'DOC' || extension === 'docx' || extension === 'DOCX' || extension === 'pdf' || extension === 'PDF') {
|
if (
|
||||||
|
extension === 'doc' ||
|
||||||
|
extension === 'DOC' ||
|
||||||
|
extension === 'docx' ||
|
||||||
|
extension === 'DOCX' ||
|
||||||
|
extension === 'pdf' ||
|
||||||
|
extension === 'PDF'
|
||||||
|
) {
|
||||||
const windowName = file.name
|
const windowName = file.name
|
||||||
window.open(file.url, windowName)
|
window.open(file.url, windowName)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -297,14 +297,18 @@
|
||||||
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus"/>
|
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="外观判定222" prop="apDetection" align="center" width="150" :show-overflow-tooltip="true">
|
<el-table-column label="外观判定" prop="apDetection" align="center" width="160" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<!-- <el-input
|
||||||
v-model.number="scope.row.apDetection"
|
v-model.number="scope.row.apDetection"
|
||||||
placeholder="外观判定" maxlength="20"
|
placeholder="外观判定" maxlength="20"
|
||||||
type="text" clearable :readonly="isView"
|
type="text" clearable :readonly="isView"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/> -->
|
||||||
|
<el-radio-group v-model="scope.row.apDetection" disabled>
|
||||||
|
<el-radio label="1">完好</el-radio>
|
||||||
|
<el-radio label="0">损坏</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="附件" align="center" width="100">
|
<el-table-column label="附件" align="center" width="100">
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ module.exports = {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
// target: `http://localhost:18080`,
|
// target: `http://localhost:18080`,
|
||||||
target: `http://192.168.2.246:18080`,//马
|
target: `http://192.168.2.247:18080`,//马
|
||||||
// target: `http://192.168.0.244:18580`,//测试
|
// target: `http://192.168.0.244:18580`,//测试
|
||||||
// target: `http://192.168.2.223:18080`,//山
|
// target: `http://192.168.2.223:18080`,//山
|
||||||
// target: `http://192.168.2.23:18080`,//洪
|
// target: `http://192.168.2.23:18080`,//洪
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue