|
@@ -16,9 +16,17 @@
|
|
|
>
|
|
>
|
|
|
<el-row :gutter="32">
|
|
<el-row :gutter="32">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="选择物料" prop="materialName">
|
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="选择物料"
|
|
|
|
|
+ prop="materialName"
|
|
|
|
|
+ :key="formData.materialName"
|
|
|
|
|
+ >
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="formData.materialName"
|
|
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ :value="
|
|
|
|
|
+ formData.materialName &&
|
|
|
|
|
+ `${formData.materialName}(${formData.materialCode})`
|
|
|
|
|
+ "
|
|
|
@click.native="chooseMateriel"
|
|
@click.native="chooseMateriel"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -48,6 +56,11 @@
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
v-model="formData.deliveryTime"
|
|
v-model="formData.deliveryTime"
|
|
|
|
|
+ :pickerOptions="{
|
|
|
|
|
+ disabledDate: (time) =>
|
|
|
|
|
+ time.getTime() <
|
|
|
|
|
+ new Date(new Date().setHours(0, 0, 0, 0)).getTime()
|
|
|
|
|
+ }"
|
|
|
type="date"
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
@@ -62,16 +75,29 @@
|
|
|
</el-col> -->
|
|
</el-col> -->
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="生产重量" prop="num">
|
|
<el-form-item label="生产重量" prop="num">
|
|
|
- <el-input v-model.number="formData.num">
|
|
|
|
|
- <template slot="suffix">
|
|
|
|
|
- {{ formData.unit }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ <!-- <el-input v-model.number="formData.num">
|
|
|
|
|
+
|
|
|
|
|
+ </el-input> -->
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="21">
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ class="w100"
|
|
|
|
|
+ v-model="formData.num"
|
|
|
|
|
+ :controls="false"
|
|
|
|
|
+ :precision="3"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ ></el-input-number>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="3" style="text-align: center">
|
|
|
|
|
+ {{ formData.unit || 'kg' }}
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="计划备注" prop="notes">
|
|
<el-form-item label="计划备注" prop="notes">
|
|
|
- <el-input v-model="formData.notes"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="formData.notes" placeholder="请选择"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -100,6 +126,7 @@
|
|
|
import ChooseMaterial from '@/components/CreatePlan/ChooseMaterial.vue';
|
|
import ChooseMaterial from '@/components/CreatePlan/ChooseMaterial.vue';
|
|
|
import ProductionVersion from '@/components/CreatePlan/ProductionVersion.vue';
|
|
import ProductionVersion from '@/components/CreatePlan/ProductionVersion.vue';
|
|
|
import { save, update } from '@/api/materialPlan/index';
|
|
import { save, update } from '@/api/materialPlan/index';
|
|
|
|
|
+ import dayjs from 'dayjs';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
ChooseMaterial,
|
|
ChooseMaterial,
|
|
@@ -140,8 +167,8 @@
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
formData: {
|
|
formData: {
|
|
|
- deliveryTime: '',
|
|
|
|
|
- num: '',
|
|
|
|
|
|
|
+ deliveryTime: dayjs(new Date()).format('YYYY-MM-DD'),
|
|
|
|
|
+ num: null,
|
|
|
notes: '',
|
|
notes: '',
|
|
|
categoryId: '',
|
|
categoryId: '',
|
|
|
unit: '',
|
|
unit: '',
|