This commit is contained in:
jackal 2024-04-12 13:18:54 +08:00
commit af2ac1b0b2
9 changed files with 70 additions and 43 deletions

View File

@ -549,6 +549,10 @@ export default {
return
}
this.queryParams.leaseApplyDetails.forEach(item=>{
if(item.num==0){
this.$message.error('机具类型库存量为零无法领料');
return
}
if(item.preNum==''){
this.$message.error('请填写预领数量');
return
@ -602,8 +606,11 @@ export default {
},
checkNum(row){
let maxNum = row.num
if(row.preNum<=1){
row.preNum = 1
}else if(row.preNum>=maxNum){
row.preNum = maxNum
}
},
///////

View File

@ -123,7 +123,7 @@
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" prop="unitCn"/>
<el-table-column label="库存数量" prop="num"/>
<el-table-column label="预领数量" align="center" prop="createTime">
<el-table-column label="预领数量" align="center">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.preNum"
@ -579,12 +579,20 @@ export default {
this.$message.error('请添加数据');
return
}
let canSave=true;
this.queryParams.leaseApplyDetails.forEach(item=>{
if(item.num==0){
this.$message.error('机具类型库存量为零无法领料');
canSave = false
return
}
if(item.preNum==''){
canSave = false
this.$message.error('请填写预领数量');
return
}
})
if(!canSave){return false}
this.queryParams.createBy = this.user.userName
this.queryParams.companyId = this.user.companyId
let res;
@ -635,8 +643,11 @@ export default {
},
checkNum(row){
let maxNum = row.num
if(row.preNum<=1){
row.preNum = 1
}else if(row.preNum>=maxNum){
row.preNum = maxNum
}
},
///////

View File

@ -169,13 +169,13 @@ export default {
// },
{
id:31,
name:'分管部门审核',
name:'机具分公司审核',
remarkKey:'deptAuditRemark',
authorKey:'deptAuditBy',
timeKey:'deptAuditTime'
},{
id:32,
name:'施工管理部审核',
name:'施工部审核',
remarkKey:'directAuditRemark',
authorKey:'directAuditBy',
timeKey:'directAuditTime'

View File

@ -442,12 +442,12 @@
prop="typeCode"
:show-overflow-tooltip="true"
/>
<el-table-column
<!-- <el-table-column
label="编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
/> -->
<el-table-column
label="当前在用量"
align="center"
@ -568,6 +568,7 @@
getUnitData,
getProData,
getAgreementInfoById,
getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogForm.vue'
import Tree from './tree.vue'
@ -778,7 +779,7 @@
if (valid) {
let backApplyInfo = []
for (let i = 0; i < this.loadingList.length; i++) {
this.loadingList[i].companyId = this.companyId
this.loadingList[i].companyId = this.companyId;
}
backApplyInfo.push({
backPerson: '张三',
@ -881,6 +882,12 @@
getViewByApply(params).then((res) => {
console.log(res)
this.loadingList = res.data.rows
this.loadingList.forEach(item=>{
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
item.useNum = res.data
})
})
this.loadingTotal = res.data.total
})
},

View File

@ -140,7 +140,7 @@
:data="leaseApplyDetails"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" min-width="55" align="center" />
<el-table-column type="selection" min-width="55" align="center" :selectable="selectable"/>
<el-table-column label="序号" type="index" min-width="120" />
<el-table-column
label="类型名称"
@ -612,6 +612,17 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
//
selectable(row) {
console.log(row)
if (row.useNum != 0) {
return true
} else {
return false
}
},
//
handleSelectionChange(selection) {
this.queryParams.leaseApplyDetails = selection
@ -758,8 +769,11 @@ export default {
},
checkNum(row){
let maxNum = row.useNum
if(row.num<=1){
row.num = 1
}else if(row.num>=maxNum){
row.num = maxNum
}
},
@ -774,7 +788,6 @@ export default {
if (nodes[0].level != 4) {
return
}
this.leaseApplyDetails.push(
this.handelTableItemData(nodes[0])
)

View File

@ -758,8 +758,11 @@ export default {
},
checkNum(row){
let maxNum = row.useNum
if(row.num<=1){
row.num = 1
}else if(row.num>=maxNum){
row.num = maxNum
}
},

View File

@ -448,12 +448,12 @@
prop="typeCode"
:show-overflow-tooltip="true"
/>
<el-table-column
<!-- <el-table-column
label="编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
/> -->
<el-table-column
label="当前在用量"
align="center"
@ -573,6 +573,7 @@
getUnitData,
getProData,
getAgreementInfoById,
getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js'
import dialogFormByCq from './dialogFormByCq.vue'
// 10:42startTime,endTime typeId
@ -873,6 +874,12 @@
getViewByApply(params).then((res) => {
// console.log(res)
this.loadingList = res.data.rows
this.loadingList.forEach(item=>{
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
item.useNum = res.data
})
})
this.loadingTotal = res.data.total
})
},

View File

@ -857,8 +857,11 @@
}
},
checkNum(row){
const maxNum = row.num;
if(row.num<=1){
row.num = 1
row.num = 1;
}else if(row.num>=maxNum){
row.num = maxNum;
}
},
handleExam() {

View File

@ -79,12 +79,6 @@
v-if="scope.row.bindNum<scope.row.checkNum"
@click="handleCode(scope.row)"
>绑定编码</el-button>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button> -->
</template>
</el-table-column>
</el-table>
@ -413,10 +407,12 @@ export default {
/** 提交按钮 */
submitForm: function() {
// console.log(this.codeList)
if(this.form.fixCode==0){
if(this.hasDuplicateField(this.codeList, 'assetsCode')){
this.$modal.msgError("固定资产编码绑定失败,存在重复编码,请重新输入");
return false
}
}
if(this.codeList.length==0){
this.$modal.msgError("无新增编码绑定");
}else{
@ -475,29 +471,9 @@ export default {
const obj = { path: "/store/newBuy/newDevicesList" }
this.$tab.closeOpenPage(obj);
},
/** 删除按钮操作 */
handleDelete(row) {
const dictIds = row.maId ;
this.$modal.confirm('是否确认删除该数据项?').then(function() {
return delMacode(dictIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
});
}
}
};
</script>