|
@@ -24,7 +24,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="领料单" prop="pickName" label-width="90px">
|
|
|
|
|
|
|
+ <el-form-item label="领料单名称" prop="pickName" label-width="90px">
|
|
|
<el-input v-model="item.pickName"></el-input>
|
|
<el-input v-model="item.pickName"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -69,7 +69,13 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
stripe
|
|
stripe
|
|
|
>
|
|
>
|
|
|
- <el-table-column label="序号" type="index" width="50">
|
|
|
|
|
|
|
+ <el-table-column label="序号" type="index" width="120">
|
|
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
|
|
+ {{ $index }}
|
|
|
|
|
+ <el-tag type="warning">{{
|
|
|
|
|
+ typeName[Number(row.rootCategoryLevelId)]
|
|
|
|
|
+ }}</el-tag>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="编码" prop="assetCode">
|
|
<el-table-column label="编码" prop="assetCode">
|
|
@@ -87,13 +93,27 @@
|
|
|
<el-table-column label="数量" prop="demandQuantity">
|
|
<el-table-column label="数量" prop="demandQuantity">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <el-input v-model="row.demandQuantity" size="mini">
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="row.demandQuantity"
|
|
|
|
|
+ @input="
|
|
|
|
|
+ row.demandQuantity > row.availableCountBase
|
|
|
|
|
+ ? (row.demandQuantity = row.availableCountBase)
|
|
|
|
|
+ : row.demandQuantity
|
|
|
|
|
+ "
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ >
|
|
|
<template slot="append">{{ row.unit }}</template>
|
|
<template slot="append">{{ row.unit }}</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
+ <el-table-column label="计量库存数量" prop="availableCountBase">
|
|
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
|
|
+ {{ row.availableCountBase }} {{ row.measuringUnit }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
<el-table-column label="领料仓库" prop="warehouseId">
|
|
<el-table-column label="领料仓库" prop="warehouseId">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<div v-if="row.warehouseList">
|
|
<div v-if="row.warehouseList">
|
|
@@ -134,6 +154,8 @@
|
|
|
<script>
|
|
<script>
|
|
|
import pickingList from './pickingList.vue';
|
|
import pickingList from './pickingList.vue';
|
|
|
import { workorderList, getCode } from '@/api/produce/workOrder';
|
|
import { workorderList, getCode } from '@/api/produce/workOrder';
|
|
|
|
|
+ import { typeName } from '../common.js';
|
|
|
|
|
+ import { batchSave } from '@/api/produce/picking';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -153,6 +175,8 @@
|
|
|
workList: [],
|
|
workList: [],
|
|
|
rules: {},
|
|
rules: {},
|
|
|
|
|
|
|
|
|
|
+ typeName,
|
|
|
|
|
+
|
|
|
tableRules: {}
|
|
tableRules: {}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
@@ -244,6 +268,21 @@
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ let _arr = [];
|
|
|
|
|
+ _arr = this.workList.map((m) => {
|
|
|
|
|
+ m.instanceList = m.pickList;
|
|
|
|
|
+ m.workOrderId = m.id;
|
|
|
|
|
+ delete m.id;
|
|
|
|
|
+ delete m.pickList;
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...m
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ batchSave(_arr).then((res) => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|