|
|
|
|
@ -39,6 +39,15 @@ |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12" v-if="sizeForm.options === 2"> |
|
|
|
|
<el-form-item label="选项"> |
|
|
|
|
<el-radio-group v-model="sizeForm.radio" :disabled="outDialogType == 'details'"> |
|
|
|
|
<el-radio :label="1">易耗品</el-radio> |
|
|
|
|
<el-radio :label="2">耐用品</el-radio> |
|
|
|
|
<el-radio :label="3">全部</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12" v-if="sizeForm.options == 1"> |
|
|
|
|
<el-form-item label="需求单名称"> |
|
|
|
|
<el-input v-model="sizeForm.demandEndInfo" disabled></el-input> |
|
|
|
|
@ -69,6 +78,11 @@ |
|
|
|
|
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="type" label="出库类型"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.type === "NY" ? "出库单" : (scope.row.type === "YH" ? "发放单" : "") }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="unit" label="单位"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="departmentName" label="部门" v-if="sizeForm.options === 2"> |
|
|
|
|
@ -91,17 +105,11 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="theOutboundQuantity" label="本次出库数量"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;" |
|
|
|
|
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="0" style="width: 100%;" |
|
|
|
|
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number> |
|
|
|
|
<!-- <span v-else>{{ scope.row.theOutboundQuantity || 0 }}</span> --> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column prop="status" label="出库情况"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button type="text" @click="putIn(scope.row)" v-if="scope.row.status == 1">出库</el-button> |
|
|
|
|
<span v-if="scope.row.status == 0">已出库</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="form-title" v-if="outDialogType !== 'details'">出库账目表格:</div> |
|
|
|
|
<el-table :data="sizeForm.inTableData" border style="width: 100%" v-if="outDialogType !== 'details'"> |
|
|
|
|
@ -117,6 +125,11 @@ |
|
|
|
|
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="type" label="出库类型"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.type === "NY" ? "出库单" : (scope.row.type === "YH" ? "发放单" : "") }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="departmentName" label="部门" v-if="sizeForm.options == 2"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span> |
|
|
|
|
@ -130,14 +143,10 @@ |
|
|
|
|
<el-table-column prop="date" label="出库信息" v-if="sizeForm.options == 1"> |
|
|
|
|
<el-table-column prop="outboundQuantity" label="数量"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.outboundQuantity || 0 }} |
|
|
|
|
</template> |
|
|
|
|
{{ scope.row.outboundQuantity || 0 }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column prop="date" label="出库后库存" v-if="sizeForm.options == 1"> |
|
|
|
|
<el-table-column prop="str10" label="数量"> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
@ -170,6 +179,15 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="选项"> |
|
|
|
|
<el-radio-group v-model="sizeForm.radio" :disabled="outDialogType == 'details'"> |
|
|
|
|
<el-radio :label="1">易耗品</el-radio> |
|
|
|
|
<el-radio :label="2">耐用品</el-radio> |
|
|
|
|
<el-radio :label="3">全部</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
@ -206,12 +224,12 @@ |
|
|
|
|
{{ scope.row.outboundQuantity || 0 }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="theOutboundQuantity" label="本次出库数量"> |
|
|
|
|
<!-- <el-table-column prop="theOutboundQuantity" label="本次出库数量"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;" |
|
|
|
|
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
@ -259,8 +277,9 @@ export default { |
|
|
|
|
inTableData: [], |
|
|
|
|
ldOneOutStorageDetailVOList: [], |
|
|
|
|
demandEndInfo: '',//需求单名称 |
|
|
|
|
outDate: '',//出库日期 |
|
|
|
|
outDate: '',//出库时间 |
|
|
|
|
options: 2,//出库类型 |
|
|
|
|
radio: 1, // 1易耗品 2耐用品 |
|
|
|
|
materialType: '1',//物资类型 |
|
|
|
|
status: '',//1暂存 2提交 |
|
|
|
|
// materialld: '',//物资Id |
|
|
|
|
@ -269,7 +288,6 @@ export default { |
|
|
|
|
name: "用户名称" |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
uniqueListDialogVisible: false, // 新增:控制弹窗显示 |
|
|
|
|
uniqueList: [], |
|
|
|
|
goodsList: [], |
|
|
|
|
goodsSelectList: [], |
|
|
|
|
@ -289,8 +307,11 @@ export default { |
|
|
|
|
const now = new Date() |
|
|
|
|
const year = now.getFullYear(); |
|
|
|
|
const month = String(now.getMonth() + 1).padStart(2, '0'); |
|
|
|
|
const day = String(now.getDate()).padStart(2, '0'); |
|
|
|
|
return `${year}年${month}月${day}日`; |
|
|
|
|
const day = String(now.getDate()).padStart(2, '0') |
|
|
|
|
const hour = String(now.getHours()).padStart(2, '0') |
|
|
|
|
const minute = String(now.getMinutes()).padStart(2, '0') |
|
|
|
|
const second = String(now.getSeconds()).padStart(2, '0') |
|
|
|
|
return `${year}-${month}-${day} ${hour}:${minute}:${second}` |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -304,6 +325,9 @@ export default { |
|
|
|
|
this.getMaterialList() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
addInit() { |
|
|
|
|
this.sizeForm.outDate = new Date()//出库时间 |
|
|
|
|
}, |
|
|
|
|
//本次出库数量 |
|
|
|
|
syncInboundQuantity(row) { |
|
|
|
|
row.theOutboundQuantity = Number(row.theOutboundQuantity); |
|
|
|
|
@ -377,12 +401,12 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (res.data && res.data.result) { |
|
|
|
|
this.sizeForm.inTableData = res.data.result.duplicateList |
|
|
|
|
this.sizeForm.inTableData = res.data.result.uniqueList |
|
|
|
|
const selectedDept = this.departmentList.find( |
|
|
|
|
dept => dept.departmentId === this.inBatchForm.department |
|
|
|
|
); |
|
|
|
|
const deptName = selectedDept ? selectedDept.department : ''; |
|
|
|
|
this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({ |
|
|
|
|
this.sizeForm.inTableData = res.data.result.uniqueList.map(item => ({ |
|
|
|
|
...item, |
|
|
|
|
IdDemandEndld: this.inBatchForm.batchType, |
|
|
|
|
// department: this.inBatchForm.department, |
|
|
|
|
@ -395,10 +419,14 @@ export default { |
|
|
|
|
if (selectedQuarter) { |
|
|
|
|
this.sizeForm.demandEndInfo = selectedQuarter.quarterName; |
|
|
|
|
} |
|
|
|
|
if (res.data.result.uniqueList != null && res.data.result.uniqueList.length > 0) { |
|
|
|
|
this.goodsVisible = true |
|
|
|
|
this.goodsList = res.data.result.uniqueList |
|
|
|
|
//当radio是全部的时候 弹弹窗 |
|
|
|
|
if (this.sizeForm.radio === 3) { |
|
|
|
|
if (res.data.result.duplicateList != null && res.data.result.duplicateList.length > 0) { |
|
|
|
|
this.goodsVisible = true |
|
|
|
|
this.goodsList = res.data.result.duplicateList |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.$message.warning('未获取到详细数据'); |
|
|
|
|
} |
|
|
|
|
@ -516,7 +544,6 @@ export default { |
|
|
|
|
try { |
|
|
|
|
const res = await editList(this.id); |
|
|
|
|
const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {}; |
|
|
|
|
|
|
|
|
|
if (!ldOneOutStorage) { |
|
|
|
|
this.$message.error("回显数据异常"); |
|
|
|
|
return; |
|
|
|
|
@ -534,20 +561,18 @@ export default { |
|
|
|
|
this.sizeForm.inTableData = handledDetailList; |
|
|
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
console.error("回显失败:", error); |
|
|
|
|
this.$message.error("获取详情数据失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
addInit() { |
|
|
|
|
this.sizeForm.outDate = new Date()//出库时间 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 添加出库数据 |
|
|
|
|
inTableAdd() { |
|
|
|
|
this.sizeForm.inTableData.push({}) |
|
|
|
|
}, |
|
|
|
|
// 选项选择 |
|
|
|
|
async radioChange() { |
|
|
|
|
// this.resetAllForms() |
|
|
|
|
this.sizeForm.inTableData = [] |
|
|
|
|
if (this.sizeForm.options === 1) { |
|
|
|
|
await this.getQuarterList() |
|
|
|
|
@ -556,6 +581,7 @@ export default { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
// 监听需求单选择变化 |
|
|
|
|
|