Commit f50b43c6 authored by 旭艳's avatar 旭艳

代码录入接口调试

parent 72d85956
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<span class="title">物料领用发放:</span> <span class="title">物料领用发放:</span>
<span v-show="false">提示:当类型非(密封剂/涂料/胶粘剂)才可扫码录入!</span> <span v-show="false">提示:当类型非(密封剂/涂料/胶粘剂)才可扫码录入!</span>
</p> </p>
<!-- <scan v-show="false" :id="onlyUuid" @getQrCode="getQRcode">扫码录入</scan> --> <scan v-show="false" :id="onlyUuid" @getQrCode="getQRcode">扫码录入</scan>
<!-- 表格 --> <!-- 表格 -->
<div> <div>
<el-table <el-table
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-table-column :width="80" label="操作" align="center"> <el-table-column :width="80" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
:disabled="!scope.row.extScanCodeRecords[0].id" :disabled="scope.row.extScanCodeRecords[0].status==='未确认'"
size="mini" size="mini"
type="danger" type="danger"
@click="deleteRow(scope.row)" @click="deleteRow(scope.row)"
...@@ -97,11 +97,11 @@ import { v4 as uuidv4 } from 'uuid' ...@@ -97,11 +97,11 @@ import { v4 as uuidv4 } from 'uuid'
import { post } from '@/utils/http' import { post } from '@/utils/http'
// 电子签名 // 电子签名
import '@/api/jq-signature' import '@/api/jq-signature'
// import scan from '@/components/scanCode/scanCode' import scan from '@/components/scanCode/scanCode'
export default { export default {
// components: { components: {
// scan scan
// }, },
data() { data() {
return { return {
// 加载中 // 加载中
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
{ {
title: '类型', title: '类型',
show: true, show: true,
key: 'extMaterial.resTypeName', key: 'extMaterial.resType2.typeName',
align: 'center', align: 'center',
sortable: true, sortable: true,
minWidth: 120 minWidth: 120
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
{ {
title: '单位', title: '单位',
show: true, show: true,
key: 'extUnit.unitName', key: 'extMaterial.extUnit.unitName',
align: 'center', align: 'center',
sortable: true, sortable: true,
minWidth: 80 minWidth: 80
...@@ -275,10 +275,15 @@ export default { ...@@ -275,10 +275,15 @@ export default {
'name': 'extScanCodeRecords' 'name': 'extScanCodeRecords'
}, },
{ {
'name': 'extMaterial' 'name': 'extMaterial',
}, 'openProps': [
{ {
'name': 'extUnit' 'name': 'resType2'
},
{
'name': 'extUnit'
}
]
} }
], ],
'sortItem': [ 'sortItem': [
...@@ -310,6 +315,14 @@ export default { ...@@ -310,6 +315,14 @@ export default {
}) })
}, },
clickScan(row) { clickScan(row) {
if (row.extScanCodeRecords[0].status === '已确认') {
this.$message({
showClose: true,
message: '已确认 不可扫码录入!',
type: 'warning'
})
return
}
this.rowId = row.id this.rowId = row.id
// if (['密封剂', '涂料', '胶粘剂'].includes(row.resTypeName)) { // if (['密封剂', '涂料', '胶粘剂'].includes(row.resTypeName)) {
// this.$message({ // this.$message({
...@@ -330,6 +343,14 @@ export default { ...@@ -330,6 +343,14 @@ export default {
// }) // })
// return // return
// } // }
if (row.extScanCodeRecords[0].status === '已确认') {
this.$message({
showClose: true,
message: '已确认 不可扫码录入!',
type: 'warning'
})
return
}
this.tableData.forEach(item => { this.tableData.forEach(item => {
if (item.id === row.id) { if (item.id === row.id) {
row.popoverVisible = true row.popoverVisible = true
...@@ -407,7 +428,7 @@ export default { ...@@ -407,7 +428,7 @@ export default {
// operator: 'REMOVE' // operator: 'REMOVE'
// } // }
// 发送请求 // 发送请求
post(`ExtScanCodeRecord/removeScanCode?id=${row.id}&reqName=${row.extMaterial.resName}`, {}) post(`ExtScanCodeRecord/removeScanCode?id=${row.extScanCodeRecords[0].id}&reqName=${row.extMaterial.resType2.typeName}`, {})
.then((res) => { .then((res) => {
if (res.message.includes('成功')) { if (res.message.includes('成功')) {
this.init() this.init()
......
...@@ -289,7 +289,15 @@ export default { ...@@ -289,7 +289,15 @@ export default {
components: { components: {
scan scan
}, },
filters: {
filterState: value => {
this.stateList.forEach(element => {
if (element.dictKey === value) {
return element.dictValue
}
})
}
},
data() { data() {
return { return {
onlyUuid: null, onlyUuid: null,
...@@ -315,11 +323,15 @@ export default { ...@@ -315,11 +323,15 @@ export default {
rules: { rules: {
scanId: [{ required: true, message: '请扫码录入' }], scanId: [{ required: true, message: '请扫码录入' }],
count: [{ required: true, message: '请输入数量' }] count: [{ required: true, message: '请输入数量' }]
} },
stateList: []
} }
}, },
created() {}, created() {},
mounted() { mounted() {
this.$utils.getDicListByCode('StorageReqStatus').then(res => {
this.stateList = res
})
this.onlyUuid = uuidv4() this.onlyUuid = uuidv4()
}, },
methods: { methods: {
...@@ -335,6 +347,11 @@ export default { ...@@ -335,6 +347,11 @@ export default {
) )
.then((res) => { .then((res) => {
this.tableData = res.items.map((p) => { this.tableData = res.items.map((p) => {
this.stateList.forEach(element => {
if (element.value === p.reqStatus) {
p.stateName = element.label
}
})
return { return {
popoverVisible: false, popoverVisible: false,
uuid: uuidv4(), uuid: uuidv4(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment