Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
af2ac1b0b2
|
|
@ -549,6 +549,10 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.queryParams.leaseApplyDetails.forEach(item=>{
|
this.queryParams.leaseApplyDetails.forEach(item=>{
|
||||||
|
if(item.num==0){
|
||||||
|
this.$message.error('机具类型库存量为零无法领料');
|
||||||
|
return
|
||||||
|
}
|
||||||
if(item.preNum==''){
|
if(item.preNum==''){
|
||||||
this.$message.error('请填写预领数量');
|
this.$message.error('请填写预领数量');
|
||||||
return
|
return
|
||||||
|
|
@ -602,8 +606,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
checkNum(row){
|
checkNum(row){
|
||||||
|
let maxNum = row.num
|
||||||
if(row.preNum<=1){
|
if(row.preNum<=1){
|
||||||
row.preNum = 1
|
row.preNum = 1
|
||||||
|
}else if(row.preNum>=maxNum){
|
||||||
|
row.preNum = maxNum
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/////// 设备类型树 切换
|
/////// 设备类型树 切换
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" />
|
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="计量单位" prop="unitCn"/>
|
<el-table-column label="计量单位" prop="unitCn"/>
|
||||||
<el-table-column label="库存数量" prop="num"/>
|
<el-table-column label="库存数量" prop="num"/>
|
||||||
<el-table-column label="预领数量" align="center" prop="createTime">
|
<el-table-column label="预领数量" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.preNum"
|
v-model.number="scope.row.preNum"
|
||||||
|
|
@ -579,12 +579,20 @@ export default {
|
||||||
this.$message.error('请添加数据');
|
this.$message.error('请添加数据');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let canSave=true;
|
||||||
this.queryParams.leaseApplyDetails.forEach(item=>{
|
this.queryParams.leaseApplyDetails.forEach(item=>{
|
||||||
|
if(item.num==0){
|
||||||
|
this.$message.error('机具类型库存量为零无法领料');
|
||||||
|
canSave = false
|
||||||
|
return
|
||||||
|
}
|
||||||
if(item.preNum==''){
|
if(item.preNum==''){
|
||||||
|
canSave = false
|
||||||
this.$message.error('请填写预领数量');
|
this.$message.error('请填写预领数量');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if(!canSave){return false}
|
||||||
this.queryParams.createBy = this.user.userName
|
this.queryParams.createBy = this.user.userName
|
||||||
this.queryParams.companyId = this.user.companyId
|
this.queryParams.companyId = this.user.companyId
|
||||||
let res;
|
let res;
|
||||||
|
|
@ -635,8 +643,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
checkNum(row){
|
checkNum(row){
|
||||||
|
let maxNum = row.num
|
||||||
if(row.preNum<=1){
|
if(row.preNum<=1){
|
||||||
row.preNum = 1
|
row.preNum = 1
|
||||||
|
}else if(row.preNum>=maxNum){
|
||||||
|
row.preNum = maxNum
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/////// 设备类型树 切换
|
/////// 设备类型树 切换
|
||||||
|
|
|
||||||
|
|
@ -169,13 +169,13 @@ export default {
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
id:31,
|
id:31,
|
||||||
name:'分管部门审核',
|
name:'机具分公司审核',
|
||||||
remarkKey:'deptAuditRemark',
|
remarkKey:'deptAuditRemark',
|
||||||
authorKey:'deptAuditBy',
|
authorKey:'deptAuditBy',
|
||||||
timeKey:'deptAuditTime'
|
timeKey:'deptAuditTime'
|
||||||
},{
|
},{
|
||||||
id:32,
|
id:32,
|
||||||
name:'施工管理部审核',
|
name:'施工部审核',
|
||||||
remarkKey:'directAuditRemark',
|
remarkKey:'directAuditRemark',
|
||||||
authorKey:'directAuditBy',
|
authorKey:'directAuditBy',
|
||||||
timeKey:'directAuditTime'
|
timeKey:'directAuditTime'
|
||||||
|
|
|
||||||
|
|
@ -442,12 +442,12 @@
|
||||||
prop="typeCode"
|
prop="typeCode"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
label="编码"
|
label="编码"
|
||||||
align="center"
|
align="center"
|
||||||
prop="maCode"
|
prop="maCode"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="当前在用量"
|
label="当前在用量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -568,6 +568,7 @@
|
||||||
getUnitData,
|
getUnitData,
|
||||||
getProData,
|
getProData,
|
||||||
getAgreementInfoById,
|
getAgreementInfoById,
|
||||||
|
getUseNumByTypeId
|
||||||
} from '@/api/claimAndRefund/receive.js'
|
} from '@/api/claimAndRefund/receive.js'
|
||||||
import dialogForm from './dialogForm.vue'
|
import dialogForm from './dialogForm.vue'
|
||||||
import Tree from './tree.vue'
|
import Tree from './tree.vue'
|
||||||
|
|
@ -778,7 +779,7 @@
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let backApplyInfo = []
|
let backApplyInfo = []
|
||||||
for (let i = 0; i < this.loadingList.length; i++) {
|
for (let i = 0; i < this.loadingList.length; i++) {
|
||||||
this.loadingList[i].companyId = this.companyId
|
this.loadingList[i].companyId = this.companyId;
|
||||||
}
|
}
|
||||||
backApplyInfo.push({
|
backApplyInfo.push({
|
||||||
backPerson: '张三',
|
backPerson: '张三',
|
||||||
|
|
@ -881,6 +882,12 @@
|
||||||
getViewByApply(params).then((res) => {
|
getViewByApply(params).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.loadingList = res.data.rows
|
this.loadingList = res.data.rows
|
||||||
|
this.loadingList.forEach(item=>{
|
||||||
|
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
|
||||||
|
item.useNum = res.data
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
this.loadingTotal = res.data.total
|
this.loadingTotal = res.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
:data="leaseApplyDetails"
|
:data="leaseApplyDetails"
|
||||||
@selection-change="handleSelectionChange"
|
@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="序号" type="index" min-width="120" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="类型名称"
|
label="类型名称"
|
||||||
|
|
@ -612,6 +612,17 @@ export default {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
//是否可用勾选框
|
||||||
|
selectable(row) {
|
||||||
|
console.log(row)
|
||||||
|
if (row.useNum != 0) {
|
||||||
|
|
||||||
|
return true
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.queryParams.leaseApplyDetails = selection
|
this.queryParams.leaseApplyDetails = selection
|
||||||
|
|
@ -758,8 +769,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
checkNum(row){
|
checkNum(row){
|
||||||
|
let maxNum = row.useNum
|
||||||
if(row.num<=1){
|
if(row.num<=1){
|
||||||
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) {
|
if (nodes[0].level != 4) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.leaseApplyDetails.push(
|
this.leaseApplyDetails.push(
|
||||||
this.handelTableItemData(nodes[0])
|
this.handelTableItemData(nodes[0])
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -758,8 +758,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
checkNum(row){
|
checkNum(row){
|
||||||
|
let maxNum = row.useNum
|
||||||
if(row.num<=1){
|
if(row.num<=1){
|
||||||
row.num = 1
|
row.num = 1
|
||||||
|
}else if(row.num>=maxNum){
|
||||||
|
row.num = maxNum
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -448,12 +448,12 @@
|
||||||
prop="typeCode"
|
prop="typeCode"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
label="编码"
|
label="编码"
|
||||||
align="center"
|
align="center"
|
||||||
prop="maCode"
|
prop="maCode"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="当前在用量"
|
label="当前在用量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -573,6 +573,7 @@
|
||||||
getUnitData,
|
getUnitData,
|
||||||
getProData,
|
getProData,
|
||||||
getAgreementInfoById,
|
getAgreementInfoById,
|
||||||
|
getUseNumByTypeId
|
||||||
} from '@/api/claimAndRefund/receive.js'
|
} from '@/api/claimAndRefund/receive.js'
|
||||||
import dialogFormByCq from './dialogFormByCq.vue'
|
import dialogFormByCq from './dialogFormByCq.vue'
|
||||||
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
||||||
|
|
@ -873,6 +874,12 @@
|
||||||
getViewByApply(params).then((res) => {
|
getViewByApply(params).then((res) => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
this.loadingList = res.data.rows
|
this.loadingList = res.data.rows
|
||||||
|
this.loadingList.forEach(item=>{
|
||||||
|
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
|
||||||
|
item.useNum = res.data
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
this.loadingTotal = res.data.total
|
this.loadingTotal = res.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -857,8 +857,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkNum(row){
|
checkNum(row){
|
||||||
|
const maxNum = row.num;
|
||||||
if(row.num<=1){
|
if(row.num<=1){
|
||||||
row.num = 1
|
row.num = 1;
|
||||||
|
}else if(row.num>=maxNum){
|
||||||
|
row.num = maxNum;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExam() {
|
handleExam() {
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,6 @@
|
||||||
v-if="scope.row.bindNum<scope.row.checkNum"
|
v-if="scope.row.bindNum<scope.row.checkNum"
|
||||||
@click="handleCode(scope.row)"
|
@click="handleCode(scope.row)"
|
||||||
>绑定编码</el-button>
|
>绑定编码</el-button>
|
||||||
<!-- <el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -413,10 +407,12 @@ export default {
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
// console.log(this.codeList)
|
// console.log(this.codeList)
|
||||||
|
if(this.form.fixCode==0){
|
||||||
if(this.hasDuplicateField(this.codeList, 'assetsCode')){
|
if(this.hasDuplicateField(this.codeList, 'assetsCode')){
|
||||||
this.$modal.msgError("固定资产编码绑定失败,存在重复编码,请重新输入");
|
this.$modal.msgError("固定资产编码绑定失败,存在重复编码,请重新输入");
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(this.codeList.length==0){
|
if(this.codeList.length==0){
|
||||||
this.$modal.msgError("无新增编码绑定");
|
this.$modal.msgError("无新增编码绑定");
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -475,29 +471,9 @@ export default {
|
||||||
const obj = { path: "/store/newBuy/newDevicesList" }
|
const obj = { path: "/store/newBuy/newDevicesList" }
|
||||||
this.$tab.closeOpenPage(obj);
|
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>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue