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