This commit is contained in:
bb_pan 2025-06-06 14:36:44 +08:00
parent 4265f8ffca
commit 3ff6086baa
7 changed files with 104 additions and 29 deletions

View File

@ -141,9 +141,11 @@
>
</el-col> -->
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">保存</el-button>
<el-button type="primary" plain icon="el-icon-truck" size="mini" @click="handleAdd(1)">退 </el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(0)"> </el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-button
type="warning"
@ -881,7 +883,7 @@ export default {
},
/** 保存按钮操作 */
handleAdd() {
handleAdd(isBack) {
this.$refs.queryForm.validate(async valid => {
if (!valid) {
return false
@ -912,7 +914,8 @@ export default {
backPerson: this.queryParams.backPerson,
phone: this.queryParams.phone,
remark: this.queryParams.remark,
agreementId: this.queryParams.agreementId
agreementId: this.queryParams.agreementId,
isBack
// backTime: this.queryParams.backTime,
// createBy: this.queryParams.createBy,
// companyId: this.queryParams.companyId,

View File

@ -140,10 +140,10 @@
<el-button size="mini" type="primary" plain icon="el-icon-edit"
v-if="scope.row.taskStatus!=2&&scope.row.taskStatus!=1" @click="handleUpdate(scope.row)"
>编辑</el-button>
<el-button size="mini" type="success" plain icon="el-icon-refresh"
<!-- <el-button size="mini" type="success" plain icon="el-icon-refresh"
v-show="scope.row.taskStatus!=2&&scope.row.taskStatus!=1" @click="handleSubmit(scope.row)"
v-hasPermi="['back:info:submit']"
>提交</el-button>
>提交</el-button> -->
<el-button size="mini" type="danger" icon="el-icon-delete"
v-if="scope.row.taskStatus!=2&&scope.row.taskStatus!=1"
@click="handleDelete(scope.row)"

View File

@ -400,7 +400,7 @@ export default {
},
mounted() {
this.projectInfoList() //
this.equipmentType() //
// this.equipmentType() //
this.getStandardConfigListApi() //
if (this.isEdit) {
console.log('isEdit', this.isEdit)
@ -409,7 +409,30 @@ export default {
this.getTaskInfo()
}
},
watch: {
maForm: {
handler(newVal, oldVal) {
if (newVal.teamId && newVal.projectId) {
this.getAgreementId()
} else {
this.equipmentTypeList = []
}
},
deep: true
}
},
methods: {
// id
getAgreementId() {
getAgreement({
teamId: this.maForm.teamId,
projectId: this.maForm.projectId
}).then(res => {
console.log('🚀 ~ getAgreementId ~ res:', res)
this.agreementId = res.data.agreementId
this.equipmentType()
})
},
/** 转换菜单数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
@ -474,7 +497,8 @@ export default {
unitName: node.unitName,
unitValue: node.unitValue,
maxSortPriority: node.maxSortPriority,
manageType: node.manageType
manageType: node.manageType,
useNum: node.useNum
})
}
@ -555,6 +579,7 @@ export default {
this.isFileFbs = true
}
// this.loading = false;
this.getAgreementId()
})
},
//
@ -642,7 +667,7 @@ export default {
.then(function () {})
.then(() => {
if (this.isEdit) {
// this.maForm.teamId = this.maForm.teamId
this.maForm.isOut = 0
this.maForm.leaseProjectId = this.maForm.projectId
console.log('编辑')
this.loading = true

View File

@ -444,6 +444,8 @@ export default {
this.typeList = response.data.rows
this.total = response.data.total
this.loading = false
}).catch(() => {
this.loading = false
})
},
/** 搜索按钮操作 */

View File

@ -43,7 +43,7 @@
</el-table-column>
<el-table-column label="工器具名称" align="center" prop="maTypeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true" />
<!-- <el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true" /> -->
<el-table-column label="出库数量" align="center" prop="outNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- manageType '编码' 使用可点击的 span -->
@ -56,7 +56,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="待出库数量" align="center" prop="pendingNum" :show-overflow-tooltip="true" />
<!-- <el-table-column label="待出库数量" align="center" prop="pendingNum" :show-overflow-tooltip="true" /> -->
<el-table-column label="领料日期" align="center" prop="leaseDate" :show-overflow-tooltip="true" />
<el-table-column label="领料班组" align="center" prop="teamName" :show-overflow-tooltip="true" />
<el-table-column label="领料工程" align="center" prop="projectName" :show-overflow-tooltip="true" />

View File

@ -141,7 +141,10 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleSave">保存</el-button>
<el-button type="primary" plain icon="el-icon-truck" size="mini" @click="handleSave(1)"> </el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleSave(0)"> </el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-if="isEdit">导出</el-button>
@ -155,7 +158,9 @@
<el-table-column align="center" label="规格型号" prop="typeName" show-overflow-tooltip />
<el-table-column align="center" label="计量单位" prop="unitName" />
<el-table-column align="center" label="当前库存" prop="storageNum" />
<el-table-column label="预领数量" prop="preNum" align="center">
<el-table-column align="center" label="在用数量" prop="useNum" />
<el-table-column align="center" label="预领数量" prop="preNum" />
<!-- <el-table-column label="预领数量" prop="preNum" align="center">
<template v-slot="scope">
<el-input
v-if="!isEdit"
@ -173,8 +178,8 @@
></el-input>
<span v-else>{{ scope.row.preNum }}</span>
</template>
</el-table-column>
<el-table-column label="出库数量" prop="outNum" align="center" v-if="isEdit">
</el-table-column> -->
<el-table-column label="出库数量" prop="outNum" align="center">
<template v-slot="scope">
<el-input
v-if="scope.row.manageType == '1'"
@ -357,7 +362,7 @@ export default {
}
],
phone: [
{ required: true, message: '联系电话不能为空', trigger: 'blur' },
// { required: true, message: '', trigger: 'blur' },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: '请输入正确的手机号码',
@ -427,19 +432,38 @@ export default {
},
mounted() {
this.projectInfoList() //
this.equipmentType() //
this.getStandardConfigListApi() //
if (this.isEdit) {
console.log('isEdit', this.isEdit)
this.taskId = this.editTaskId
this.id = this.editId
this.getTaskInfo()
this.equipmentType()
}
// this.projectInfoList();
// this.equipmentType();
},
watch: {
maForm: {
handler(newVal, oldVal) {
if (newVal.teamId && newVal.projectId) {
this.getAgreementId()
} else {
this.equipmentTypeList = []
}
},
deep: true
}
},
methods: {
// id
getAgreementId() {
getAgreement({
teamId: this.maForm.teamId,
projectId: this.maForm.projectId
}).then(res => {
console.log('🚀 ~ getAgreementId ~ res:', res)
this.agreementId = res.data.agreementId
this.equipmentType()
})
},
/** 转换菜单数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
@ -471,7 +495,7 @@ export default {
},
/** 机具类型 */
equipmentType() {
equipmentTypeTree().then(response => {
equipmentTypeTree({ agreementId: this.agreementId }).then(response => {
this.equipmentTypeList = response.data
//
this.flattenTypeOptions = this.processTypeData(response.data)
@ -504,7 +528,8 @@ export default {
unitName: node.unitName,
unitValue: node.unitValue,
maxSortPriority: node.maxSortPriority,
manageType: node.manageType
manageType: node.manageType,
useNum: node.useNum
})
}
@ -657,7 +682,7 @@ export default {
}
},
/** 保存按钮操作 */
handleSave() {
handleSave(isOut) {
// console.log(this.equipmentList)
console.log('maForm', this.maForm)
if (this.equipmentList.length > 0) {
@ -684,12 +709,12 @@ export default {
.confirm('是否确认保存当前页面')
.then(function () {})
.then(() => {
this.maForm.isOut = isOut
if (this.isEdit) {
// this.maForm.teamId = this.maForm.teamId
this.maForm.leaseProjectId = this.maForm.projectId
console.log('编辑')
this.loading = true
submitOut({
updateApplyInfo({
leaseOutDetailsList: this.equipmentList,
leaseApplyInfo: this.maForm
})
@ -705,6 +730,20 @@ export default {
})
} else if (!this.isEdit) {
console.log('新增')
addApplyInfo({
leaseApplyDetailsList: this.equipmentList,
leaseApplyInfo: this.maForm
})
.then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('出库成功')
this.$emit('addToolsSuccess')
}
this.loading = false
})
.catch(() => {
this.loading = false
})
}
})
.catch(() => {})

View File

@ -42,6 +42,9 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">领料申请</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-col>
@ -49,7 +52,7 @@
</el-row>
<el-table v-loading="loading" :data="typeList" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<!-- <el-table-column type="selection" width="55" align="center" :selectable="selectable" /> -->
<el-table-column width="60" align="center" label="序号" type="index">
<template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
@ -85,9 +88,9 @@
<el-button size="mini" style="margin-bottom: 10px" type="normal" @click="handleView(scope.row)">
查看
</el-button>
<el-button size="mini" type="primary" @click="handleSubmit(scope.row)" v-if="scope.row.taskStatus != 4">
<!-- <el-button size="mini" type="primary" @click="handleSubmit(scope.row)" v-if="scope.row.taskStatus != 4">
提交
</el-button>
</el-button> -->
<el-button
size="mini"
style="margin-bottom: 10px"
@ -96,7 +99,7 @@
v-if="scope.row.taskStatus == 1"
v-hasPermi="['purchase:info:edit']"
>
出库
编辑
</el-button>
<el-button size="mini" type="warning" v-if="scope.row.taskStatus != 1" @click="handleLld(scope.row)">
领料单
@ -461,6 +464,9 @@ export default {
this.typeList = response.data.rows
this.total = response.data.total
this.loading = false
}).catch(error => {
console.log('🚀 ~ getList ~ error:', error)
this.loading = false
})
},
/** 搜索按钮操作 */