代码提交

master
taozi 4 months ago
parent 5e65cd5811
commit 2902aca464
  1. 110
      src/views/firstOrder/components/outDialog.vue
  2. 26
      src/views/firstOrder/inbound.vue
  3. 15
      src/views/firstOrder/outbound.vue

@ -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() {

@ -83,12 +83,21 @@ export default {
{
label: "采购单名称",
prop: "purchaseEndInfo",
width: 180,
width: 150,
align: "center",
formatter: (row, column) => {
const value = row.purchaseEndInfo;
if (value === null || value === undefined || value === "") {
return "无"; //
}
return value; //
}
},
{
label: "入库单号",
prop: "orderNo",
width: 110
width: 160,
align: "center"
},
{
label: "入库日期",
@ -100,7 +109,8 @@ export default {
endPlaceholder: "结束时间",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
width: 140,
width: 160,
align: "center"
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
@ -108,23 +118,27 @@ export default {
label: "入库人",
prop: "inOperatorName",
search: true,
searchParam: 'inOperator'
searchParam: 'inOperator',
align: "center"
},
{
label: "来源",
prop: "source",
search: false,
align: "center"
},
{
label: "事由",
prop: "reason",
search: false,
align: "center"
},
{
label: "物资类型",
prop: "materialType",
search: false,
type: 'select',
align: "center",
dicData: [{
label: '办公物资',
value: '1'
@ -137,11 +151,13 @@ export default {
{
label: "审批人员",
prop: "approvers",
align: "center"
},
{
label: "状态",
prop: "status",
type: 'select',
align: "center",
dicData: [
{
label: '暂存',
@ -184,7 +200,7 @@ export default {
this.inDialogType = 'details'
this.inDialogTiltle = '详情'
this.id = row.id
console.log(this.id,'id')
console.log(this.id, 'id')
},
//
handleEdit(row) {

@ -83,12 +83,14 @@ export default {
{
label: "需求单名称",
prop: "demandEndInfo",
width: 180,
width: 150,
align: "center"
},
{
label: "出库单号",
prop: "orderNo",
width: 110
width: 160,
align: "center"
},
{
label: "出库日期",
@ -100,7 +102,8 @@ export default {
endPlaceholder: "结束时间",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
width: 140,
width: 160,
align: "center"
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
@ -108,12 +111,14 @@ export default {
label: "事由",
prop: "reason",
search: false,
align: "center"
},
{
label: "物资类型",
prop: "materialType",
search: false,
type: 'select',
align: "center",
dicData: [{
label: '办公物资',
value: '1'
@ -126,12 +131,14 @@ export default {
{
label: "部门",
prop: "department",
align: "center"
},
{
label: "出库人",
prop: "shipperName",
search: true,
searchParam: 'inOperator'
searchParam: 'inOperator',
align: "center"
},
// {

Loading…
Cancel
Save