领料出库成套设备支持增减
This commit is contained in:
parent
bdafab2675
commit
b24481e687
|
|
@ -431,4 +431,18 @@ export function updateOutTime(data) {
|
|||
},
|
||||
data,
|
||||
})
|
||||
}
|
||||
//领料出库查看附件修改预领数量
|
||||
export function updatePreNum(params) {
|
||||
return request({
|
||||
url: '/material/maWhole/updatePreNum',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
// 查询编辑 成套设备单
|
||||
export const queryCompleteSetToolsApiTwo = (data) => {
|
||||
return request.get('/material/maWhole/selectListByIdTwo', {
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@
|
|||
prop="outNum"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="差缺量" align="center" prop="" show-overflow-tooltip>
|
||||
<!-- <el-table-column label="差缺量" align="center" prop="" show-overflow-tooltip>
|
||||
<template
|
||||
slot-scope="scope"
|
||||
v-if="Number(scope.row.outNum) - Number(scope.row.num) > 0"
|
||||
|
|
@ -204,7 +204,7 @@
|
|||
{{ Number(scope.row.outNum) - Number(scope.row.num) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="预领数量" align="center" prop="preNum" show-overflow-tooltip />
|
||||
<el-table-column label="申请人" align="center" prop="applyFor" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
|
|
|
|||
|
|
@ -241,8 +241,8 @@
|
|||
</el-dialog>
|
||||
|
||||
<el-dialog title="附件详情" :visible.sync="openFileVisible" width="50%" append-to-body>
|
||||
<el-table :data="fileList">
|
||||
<!-- <el-table-column align="center" prop="typeName" label="设备名称" /> -->
|
||||
<el-table :data="fileList" height="500px">
|
||||
<el-table-column align="center" label="设备名称" prop="typeName" />
|
||||
<el-table-column align="center" label="规格型号" prop="deviceType" />
|
||||
<el-table-column align="center" label="是否管理库存">
|
||||
<template slot-scope="{ row }">
|
||||
|
|
@ -250,9 +250,31 @@
|
|||
<el-tag size="mini" type="warning" v-if="row.isStorage == 0">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预领数量" prop="applyNum" align="center" />
|
||||
<el-table-column label="预领数量" prop="applyNum" align="center" >
|
||||
<template slot-scope="scope" >
|
||||
<el-input v-model="scope.row.applyNum" type="number"
|
||||
style="width: 100%; text-align: center"
|
||||
min="0"
|
||||
v-if="scope.row.isStorage == 0"
|
||||
@change="handleApplyNumChange(scope.row,$event)"
|
||||
/>
|
||||
<span v-else>{{scope.row.applyNum}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="库存数量" prop="num" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="success"
|
||||
@click="handleUpdatePie()"
|
||||
>确认修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleClosePie()"
|
||||
>关闭</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
|
||||
|
|
@ -494,6 +516,8 @@ import {
|
|||
getLeaseListAll,
|
||||
getLeaseOutOrder,
|
||||
updateOutTime,
|
||||
updatePreNum,
|
||||
queryCompleteSetToolsApiTwo,
|
||||
} from '@/api/claimAndRefund/receive.js'
|
||||
import { queryCompleteSetToolsApi } from '@/api/store/completeTools.js'
|
||||
import { getTypeList } from '@/api/store/warehousing'
|
||||
|
|
@ -921,21 +945,57 @@ export default {
|
|||
|
||||
// 查看附件
|
||||
async onViewFile(row) {
|
||||
const res = await queryCompleteSetToolsApi({
|
||||
const res = await queryCompleteSetToolsApiTwo({
|
||||
id: row.ctParentId,
|
||||
wholeTypeName: row.wholeName,
|
||||
wholeTypeNum: 1,
|
||||
parentId: row.parentId,
|
||||
// wholeTypeName: row.wholeName,
|
||||
// wholeTypeNum: 1,
|
||||
})
|
||||
|
||||
this.fileList = res.data.map((j) => {
|
||||
return {
|
||||
...j,
|
||||
applyNum: j.deviceNum * row.setsNum,
|
||||
// applyNum: j.deviceNum * row.setsNum,
|
||||
}
|
||||
})
|
||||
|
||||
this.openFileVisible = true
|
||||
},
|
||||
//修改附件中预领数量
|
||||
handleApplyNumChange(row, val) {
|
||||
// 判断修改的预领数量是否小于 0
|
||||
if (val < 0) {
|
||||
// 如果小于 0,则将预领数量设置为 0
|
||||
row.applyNum = 0;
|
||||
} else {
|
||||
row.applyNum = val;
|
||||
}
|
||||
},
|
||||
|
||||
//附件确认修改
|
||||
handleUpdatePie(){
|
||||
const params = this.fileList.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
applyNum: item.applyNum,
|
||||
}
|
||||
})
|
||||
updatePreNum(params).then((response) => {
|
||||
if(response.code === 200){
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.handleDialogQuery()
|
||||
this.openFileVisible = false;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//关闭附件详情
|
||||
handleClosePie(){
|
||||
this.openFileVisible = false;
|
||||
},
|
||||
|
||||
|
||||
changeTime(newValue) {
|
||||
this.$confirm('确认要修改出库时间吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@
|
|||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip" slot="tip">只能上传xlsx文件</div>
|
||||
<div class="el-upload__tip" slot="tip" style="color: red;">只能上传.xlsx文件</div>
|
||||
</el-upload>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
|||
Loading…
Reference in New Issue