|
|
|
|
@ -132,10 +132,8 @@ |
|
|
|
|
</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"> |
|
|
|
|
@ -176,6 +174,44 @@ |
|
|
|
|
<el-button type="primary" @click="batchSubmit()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 耐用品选择弹窗 --> |
|
|
|
|
<el-dialog :close-on-click-modal="false" title="选择耐用品" :visible.sync="goodsVisible" :append-to-body="true" |
|
|
|
|
width="40%" @selection-change="goodsListSelectionChange"> |
|
|
|
|
<el-table :data="goodsList" border style="width: 100%"> |
|
|
|
|
<el-table-column type="selection" width="55"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="materialCode" label="物资编码"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="materialName" label="物资名称"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="model" label="规格"> |
|
|
|
|
</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="部门"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="applicationQuantity" label="申请数量"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="outboundQuantity" label="已出库数量"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="theInboundQuantity" label="本次入库数量"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;" |
|
|
|
|
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="goodsVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="goodsSubmit()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
@ -205,6 +241,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
goodsVisible: false, |
|
|
|
|
quarterList: [], |
|
|
|
|
departmentList: [], |
|
|
|
|
outDialogVisible: false, |
|
|
|
|
@ -227,6 +264,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
uniqueListDialogVisible: false, // 新增:控制弹窗显示 |
|
|
|
|
uniqueList: [], |
|
|
|
|
goodsList: [], |
|
|
|
|
goodsSelectList: [], |
|
|
|
|
inTableData: [], |
|
|
|
|
inBatchDialogVisible: false,//选择采购单的数据 |
|
|
|
|
batchType: '',//需求单选择类型 |
|
|
|
|
@ -325,33 +364,48 @@ export default { |
|
|
|
|
this.$message.error('请选择部门'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const res = await getDetailedList({ |
|
|
|
|
ids: this.inBatchForm.batchType, |
|
|
|
|
departmentId: this.inBatchForm.department |
|
|
|
|
}) |
|
|
|
|
if (res.data && res.data.result) { |
|
|
|
|
this.sizeForm.inTableData = res.data.result.duplicateList |
|
|
|
|
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 => ({ |
|
|
|
|
...item, |
|
|
|
|
IdDemandEndld: this.inBatchForm.batchType, |
|
|
|
|
// department: this.inBatchForm.department, |
|
|
|
|
department: deptName |
|
|
|
|
})); |
|
|
|
|
this.inBatchDialogVisible = false; |
|
|
|
|
const selectedQuarter = this.quarterList.find( |
|
|
|
|
item => item.ids === this.inBatchForm.batchType |
|
|
|
|
) |
|
|
|
|
if (selectedQuarter) { |
|
|
|
|
this.sizeForm.demandEndInfo = selectedQuarter.quarterName; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning('未获取到详细数据'); |
|
|
|
|
const res = await getDetailedList({ |
|
|
|
|
ids: this.inBatchForm.batchType, |
|
|
|
|
departmentId: this.inBatchForm.department |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (res.data && res.data.result) { |
|
|
|
|
this.sizeForm.inTableData = res.data.result.duplicateList |
|
|
|
|
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 => ({ |
|
|
|
|
...item, |
|
|
|
|
IdDemandEndld: this.inBatchForm.batchType, |
|
|
|
|
// department: this.inBatchForm.department, |
|
|
|
|
department: deptName |
|
|
|
|
})); |
|
|
|
|
this.inBatchDialogVisible = false; |
|
|
|
|
const selectedQuarter = this.quarterList.find( |
|
|
|
|
item => item.ids === this.inBatchForm.batchType |
|
|
|
|
) |
|
|
|
|
if (selectedQuarter) { |
|
|
|
|
this.sizeForm.demandEndInfo = selectedQuarter.quarterName; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(res.data.result.abc != null && res.data.result.abc.length > 0){ |
|
|
|
|
this.data.goodsVisible = true |
|
|
|
|
this.data.goodsList = res.data.result.abc |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.$message.warning('未获取到详细数据'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//易用品选择回调函数 |
|
|
|
|
goodsListSelectionChange(val){ |
|
|
|
|
this.goodsSelectList = val |
|
|
|
|
}, |
|
|
|
|
//易用品弹窗点击确认按钮 |
|
|
|
|
goodsSubmit(){ |
|
|
|
|
this.data.goodsVisible = false |
|
|
|
|
this.sizeForm.inTableData.push(this.goodsSelectList) |
|
|
|
|
}, |
|
|
|
|
//获取单条选择的部门名称列表 |
|
|
|
|
async getDetailedItems() { |
|
|
|
|
|