| | |
| | | <el-option :label="item.label" v-for="item in coalList" :key="item.value" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="单位" prop="unit"> |
| | | <el-select |
| | | v-model="form.unit" |
| | | placeholder="请选择单位" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="吨" value="吨" /> |
| | | <el-option label="千克" value="千克" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="采购数量" prop="purchaseQuantity"> |
| | | <el-input |
| | | v-model.number="form.purchaseQuantity" |
| | |
| | | @blur="handleQuantityBlur" |
| | | > |
| | | <template v-slot:suffix> |
| | | <i style="font-style: normal">{{ form.unit ? form.unit : "" }}</i> |
| | | <i style="font-style: normal">吨</i> |
| | | </template> |
| | | </el-input> </el-form-item |
| | | ><el-form-item label="税率" prop="taxRate"> |
| | | </el-input> |
| | | </el-form-item |
| | | > |
| | | <el-form-item label="税率" prop="taxRate"> |
| | | <el-input |
| | | v-model.number="form.taxRate" |
| | | placeholder="请输入税率" |
| | |
| | | <div class="dialog-footer"> |
| | | <!-- 重置和取消 --> |
| | | <el-button @click="handleClose" v-if="title.includes('新增')" |
| | | >取消</el-button |
| | | >取消 |
| | | </el-button |
| | | > |
| | | <el-button @click="handleReset" v-if="title.includes('编辑')" |
| | | >重置</el-button |
| | | >重置 |
| | | </el-button |
| | | > |
| | | <el-button type="primary" @click="handleSubmit">确认</el-button> |
| | | </div> |
| | |
| | | import { ElMessage } from "element-plus"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { addOrEditPR,getSupplyList, getCoalInfoList } from "@/api/procureMent"; |
| | | import { getSupply } from "@/api/basicInformation/supplier"; |
| | | import { getCoalInfo } from "@/api/basicInformation/coal"; |
| | | |
| | | const props = defineProps({ |
| | | title: { |
| | | type: String, |
| | |
| | | getSupplyList(), |
| | | getCoalInfoList(), |
| | | ]); |
| | | console.log(supplyRes, coalRes); |
| | | let supplyData = supplyRes.data; |
| | | let coalData = coalRes.data; |
| | | supplyList.value = supplyData.map((item) => ({ |
| | |
| | | { required: true, message: "请输入供应商名称", trigger: "blur" }, |
| | | ], |
| | | coal: [{ required: true, message: "请输入煤种", trigger: "blur" }], |
| | | unit: [{ required: true, message: "请输入单位", trigger: "blur" }], |
| | | purchaseQuantity: [ |
| | | { required: true, message: "请输入采购数量", trigger: "blur" }, |
| | | { type: "number", message: "采购数量必须为数字", trigger: "blur" }, |