Commit ef4aafd5 authored by jingnan's avatar jingnan 👀

ERP相关_物料确认物料配套发放返回值处理及扫码确认参数修改

parent 391d037b
......@@ -18,7 +18,7 @@
<el-table-column type="index" :width="80" label="序号" align="center" />
<el-table-column v-if="flag" :width="120" label="扫码录入" align="center">
<template slot-scope="scope">
<!-- v-if="scope.row.extMaterial.resType2.typeName === '标准件' " -->
<!-- v-if="scope.row.materialType === '标准件' " -->
<el-popover
v-model="scope.row.popoverVisible"
placement="right"
......@@ -51,9 +51,9 @@
placeholder="型号/件号 加载中..."
/>
</el-form-item>
<el-form-item label="数量:" prop="count">
<!-- <el-form-item label="数量:" prop="count">
<el-input v-model="typing.count" placeholder="请填写数量" />
</el-form-item>
</el-form-item> -->
</el-form>
<div class="footer">
<el-button
......@@ -83,7 +83,7 @@
</el-popover>
</template>
</el-table-column>
<el-table-column
<!-- <el-table-column
v-if="flag"
prop="extMaterial.isRecord"
label="是否记实"
......@@ -99,9 +99,9 @@
}
}
"
/>
/> -->
<el-table-column
prop="extMaterial.resCode"
prop="reqCode"
align="center"
label="物料编码"
:width="120"
......@@ -109,7 +109,7 @@
show-overflow-tooltip
/>
<el-table-column
prop="extMaterial.modelNo"
prop="modelNo"
align="center"
label="型号/件号"
:width="120"
......@@ -117,7 +117,7 @@
show-overflow-tooltip
/>
<el-table-column
prop="extMaterial.resName"
prop="reqName"
align="center"
label="名称"
:width="120"
......@@ -125,9 +125,9 @@
show-overflow-tooltip
/>
<el-table-column
prop="extMaterial.resType2.typeName"
prop="materialType"
align="center"
label="零件类型"
label="物料类型"
:width="120"
sortable
/>
......@@ -139,57 +139,44 @@
sortable
/>
<el-table-column
prop="extMaterial.extUnit.unitName"
prop="unit"
align="center"
label="单位"
:width="80"
/>
<el-table-column
prop="realityModelNo"
align="center"
label="型号/件号"
:width="120"
sortable
show-overflow-tooltip
>
<template slot-scope="scope">
<span
v-if="scope.row.weigthObj"
> {{ scope.row.weigthObj.inventory.extMaterial.modelNo }}</span>
</template>
</el-table-column>
/>
<el-table-column
prop="arrivalVer"
align="center"
label="实发版次"
:width="120"
sortable
>
<template slot-scope="scope">
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.inventory.jobResponse.jobOrder.arrivalVer }}</span>
</template>
</el-table-column>
/>
<el-table-column
prop="testNo"
align="center"
label="验收单号"
:width="120"
sortable
show-overflow-tooltip
>
<template slot-scope="scope">
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.inventory.jobResponse.jobOrder.inventoryJobResponses[0].testNo }}</span>
</template>
</el-table-column>
/>
<el-table-column
align="center"
prop="acceptedAmount"
label="已接收数量"
:width="130"
sortable
>
<template slot-scope="scope">
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.jobOrder.checkoutAmount }}</span>
</template>
</el-table-column>
/>
<el-table-column
align="center"
prop="actualAmount"
label="实发数量"
:width="120"
sortable
......@@ -220,10 +207,9 @@
/>
<span
v-else-if="
scope.row.weigthObj &&
scope.row.extMaterial.resType2.typeName === '外购成品'
scope.row.materialType === '外购成品'
"
>{{ scope.row.weigthObj.actualWeight }}</span>
>{{ scope.row.actualWeight }}</span>
<i v-if="scope.row.actualWeightLoading" class="el-icon-loading" />
</template>
</el-table-column>
......@@ -247,7 +233,7 @@
@focus="tableInputFocus"
@blur="deeTableBlur(scope.row, false)"
/>
<span v-else-if="scope.row.weigthObj && scope.row.extMaterial.resType2.typeName === '外购成品'">{{ scope.row.weigthObj.removeWeight }}</span>
<span v-else-if=" scope.row.materialType === '外购成品'">{{ scope.row.removeWeight }}</span>
<i v-if="scope.row.removeWeightLoading" class="el-icon-loading" />
</template>
</el-table-column>
......@@ -258,6 +244,13 @@
:width="80"
sortable
/>
<el-table-column
align="center"
prop="affirm"
label="扫码确认"
:width="130"
sortable
/>
</el-table>
</div>
<!-- <el-pagination
......@@ -317,7 +310,8 @@ export default {
count: [{ required: true, message: '请输入数量' }]
},
stateList: [],
flag: false
flag: false,
oriData: [] // 本地row做了处理,需记录返回原数据,扫码时传给后端
}
},
created() {},
......@@ -345,9 +339,10 @@ export default {
)
.then((res) => {
const arr = []
this.oriData = res.items.slice()
res.items.map((p) => {
this.stateList.forEach(element => {
if (element.value === p.reqStatus) {
if (element.value === p.reqState) {
if (element.value === 'Not') {
p.stateName = '未出库'
} else {
......@@ -355,31 +350,31 @@ export default {
}
}
})
if (p.jobResponseOutStorageVOS && p.jobResponseOutStorageVOS.length > 0) {
p.jobResponseOutStorageVOS.forEach(item => {
arr.push({
weigthObj: item,
popoverVisible: false,
uuid: uuidv4(),
...p,
actualWeightSelect: false,
removeWeightSelect: false,
actualWeightLoading: false,
removeWeightLoading: false
})
})
} else {
arr.push({
weigthObj: null,
popoverVisible: false,
uuid: uuidv4(),
...p,
actualWeightSelect: false,
removeWeightSelect: false,
actualWeightLoading: false,
removeWeightLoading: false
})
}
// if (p.jobResponseOutStorageVOS && p.jobResponseOutStorageVOS.length > 0) {
// p.jobResponseOutStorageVOS.forEach(item => {
// arr.push({
// weigthObj: item,
// popoverVisible: false,
// uuid: uuidv4(),
// ...p,
// actualWeightSelect: false,
// removeWeightSelect: false,
// actualWeightLoading: false,
// removeWeightLoading: false
// })
// })
// } else {
arr.push({
// weigthObj: null,
popoverVisible: false,
uuid: uuidv4(),
...p,
actualWeightSelect: false,
removeWeightSelect: false,
actualWeightLoading: false,
removeWeightLoading: false
})
// }
})
this.tableData = arr
// this.tableData = res.items.map((p) => {
......@@ -389,7 +384,7 @@ export default {
// })
// }
// this.stateList.forEach(element => {
// if (element.value === p.reqStatus) {
// if (element.value === p.reqState) {
// if (element.value === 'Not') {
// p.stateName = '未出库'
// } else {
......@@ -431,7 +426,7 @@ export default {
},
deeTableEdit(row, column, cell, event) {
const that = this
if (row.extMaterial.resType2.typeName !== '外购成品' || !row.jobResponseOutStorageVOS || !this.flag) return
if (row.materialType !== '外购成品' || !row.jobResponseOutStorageVOS || !this.flag) return
if (column.property === 'actualWeight') {
this.setRowValue = row.actualWeight
row.actualWeightSelect = true
......@@ -464,7 +459,7 @@ export default {
const that = this
const param = {
operator: 'MODIFY',
id: row.weigthObj.id,
id: row.jobOutId,
actualWeight: row.actualWeight,
removeWeight: row.removeWeight
}
......@@ -516,10 +511,10 @@ export default {
this.$refs[formName].resetFields()
},
clickScan(row) {
if (row.stateName === '已出库') {
if (row.affirm === '已确认') {
this.$message({
showClose: true,
message: '已出库 不可扫码录入!',
message: '已确认 不可扫码录入!',
type: 'warning'
})
return
......@@ -529,10 +524,10 @@ export default {
row.popoverVisible = true
},
codeScanBar(row) {
if (row.stateName === '已出库') {
if (row.affirm === '已确认') {
this.$message({
showClose: true,
message: '已出库 不可扫码录入',
message: '已确认 不可扫码录入',
type: 'warning'
})
return
......@@ -569,14 +564,16 @@ export default {
*/
getQRcode(row) {
// 发送请求
const id = this.rowId
// const id = this.rowId
const scanId = this.typing.scanId
const count = this.typing.count
// const count = this.typing.count
const currentRow = this.oriData.find(item => item.jobOutId === row.jobOutId) || {}
delete currentRow.stateName
row.popoverVisible = false
row.stateName = '已出库'
post(
`/ExtScanCodeRecord/scanErpSorting?suppId=${id}&erpJobId=${scanId}&amount=${count}`,
{},
`/ExtScanCodeRecord/scanErpSorting?erpJobId=${scanId}`,
currentRow,
)
.then((res) => {
if (res.message.includes('成功')) {
......
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