| | |
| | | placeholder="请输入数量" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="采购员" |
| | | prop="purchaser" |
| | | :rules="[{ required: true, message: '请输入采购员', trigger: ['blur', 'change'] }]" |
| | | > |
| | | <el-input |
| | | v-model="editForm.purchaser" |
| | | placeholder="请输入采购员" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <template #footer> |
| | |
| | | const editForm = reactive({ |
| | | id: undefined, |
| | | qualitity: undefined, |
| | | purchaser: "", |
| | | }); |
| | | |
| | | const handleEdit = (row) => { |
| | | editForm.id = row.id; |
| | | editForm.qualitity = row.qualitity; |
| | | editForm.purchaser = row.purchaser ?? ""; |
| | | isShowEditModal.value = true; |
| | | }; |
| | | |
| | |
| | | |
| | | editForm.id = undefined; |
| | | editForm.qualitity = undefined; |
| | | editForm.purchaser = ""; |
| | | |
| | | editFormRef.value?.clearValidate?.(); |
| | | }; |
| | |
| | | const handleEditSubmit = () => { |
| | | editFormRef.value?.validate?.((valid) => { |
| | | if (!valid) return; |
| | | editStockOut({ ...editForm }).then(() => { |
| | | const { purchaser, ...payload } = editForm || {}; |
| | | editStockOut(payload).then(() => { |
| | | closeEditModal(); |
| | | proxy.$modal.msgSuccess("编辑成功"); |
| | | getList(); |