Files
yudao-dev/src/views/safetyEnvironmental/environmental/wasteWater/wasteWaterDetectionIndication/components/wasteWaterAdd.vue
2023-12-05 14:30:32 +08:00

161 lines
5.5 KiB
Vue

<template>
<el-form ref="wasteWaterAddForm" :rules="rules" label-width="130px" :model="form">
<el-row :gutter="20">
<el-col :span='12'>
<el-form-item label="指标名称" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="指标编码" prop="code">
<el-input v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="指标名称" prop="name1">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="最小值" prop="code11">
<el-input v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="最大值" prop="name12">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="备注" prop="code1122">
<el-input v-model="form.code"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'WasteWaterAdd',
data() {
return {
// rules: {
// name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
// code: [{ required: true, message: "订单号不能为空", trigger: "blur" }],
// planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
// planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }]
// }
}
},
methods: {
// init(id) {
// this.getList()
// if (id) {
// this.isEdit = true
// this.form.id = id
// getOrderById({id: this.form.id}).then(res => {
// if (res.code === 0) {
// this.form.name = res.data.name
// this.form.code = res.data.code
// this.form.planQuantity = res.data.planQuantity
// this.form.planProductId = res.data.planProductId
// this.form.price = res.data.price
// this.form.customerId = res.data.customerId
// this.form.priority = res.data.priority ? res.data.priority + '' : ''
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
// this.form.workers = res.data.workers
// this.form.processFlowId = res.data.processFlowId
// this.form.materialMethod = res.data.materialMethod
// this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null
// this.form.remark = res.data.remark
// // this.form.description = res.data.description
// }
// })
// } else {
// this.isEdit = false
// this.form.id = ''
// // 订单号
// getOrderCode().then(res => {
// this.form.code = res.data || ''
// })
// }
// },
// getList() {
// // 产品
// getProductAll().then(res => {
// this.productList = res.data || []
// })
// // 客户
// getCustomerList().then(res => {
// this.customerList = res.data || []
// })
// // 工艺
// getProcessFlowList().then(res => {
// this.processFlowList = res.data || []
// })
// },
// timeChange() {
// if (this.form.planStartTime && this.form.planFinishTime) {
// if (this.form.planStartTime > this.form.planFinishTime) {
// this.$modal.msgError('计划开始时间不能大于结束时间')
// }
// }
// },
// // 工艺变更
// materialMethodChange(val) {
// if (val === 2 && !this.form.processFlowId) {
// this.form.materialMethod = 1
// this.$modal.msgError("请先选择关联工艺");
// }
// },
// // 工艺变更
// processFlowIdChange(val) {
// console.log(val)
// if (!val) {
// this.form.materialMethod = 1
// }
// },
// submitForm() {
// this.$refs['orderAddForm'].validate((valid) => {
// if (valid) {
// if (this.form.planStartTime && this.form.planFinishTime) {
// if (this.form.planStartTime > this.form.planFinishTime) {
// this.$modal.msgError('计划开始时间不能大于结束时间')
// return false
// }
// }
// // console.log(this.form)
// if (this.isEdit) {
// //编辑
// orderUpdate({ ...this.form }).then((res) => {
// if (res.code === 0) {
// this.$modal.msgSuccess("操作成功");
// this.$emit('successSubmit')
// }
// })
// } else {
// this.form.status = 1
// this.form.triggerOrigin = 1
// orderCreate({ ...this.form }).then((res) => {
// if (res.code === 0) {
// this.$modal.msgSuccess("操作成功");
// this.$emit('successSubmit')
// }
// })
// }
// } else {
// return false
// }
// })
// },
// formClear() {
// this.$refs.orderAddForm.resetFields()
// this.form.materialMethod = 1
// this.form.price = 0.00
// this.form.planQuantity = 0
// this.isEdit = false
// }
}
}
</script>