|
@@ -0,0 +1,153 @@
|
|
|
+<template>
|
|
|
+ <div class="app-containeteamIdr">
|
|
|
+ <el-form
|
|
|
+ :model="form"
|
|
|
+ ref="form"
|
|
|
+ label-position="top"
|
|
|
+ label-width="100px"
|
|
|
+ align="left"
|
|
|
+ :inline="false"
|
|
|
+ size="normal"
|
|
|
+ >
|
|
|
+ <el-col :span="12">
|
|
|
+ <span>质控卡号</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <span>数量</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <span>ZL</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <span>1</span>
|
|
|
+ </el-col>
|
|
|
+ <el-form-item label="备注:" prop="remark">
|
|
|
+ <el-input v-model="form.remark"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="submitHandler"
|
|
|
+ icon="el-icon-success"
|
|
|
+ >记录</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
|
|
|
+export default {
|
|
|
+ name: "RecordSplitData",
|
|
|
+ props: ["formData", "row"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isEdit: false,
|
|
|
+ form: {
|
|
|
+ remark: "",
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ myFormData() {
|
|
|
+ return this.formData;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ myFormData: {
|
|
|
+ handler(nval) {
|
|
|
+ this.form = nval.resultMap;
|
|
|
+ // this.form.hp = this.form.goodId
|
|
|
+ console.log(this.form);
|
|
|
+ // this.isEdit = this.form.id ? true : false;
|
|
|
+ this.isEdit = this.form.taskProcessKey && this.form.taskNodeKey;
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ async submitHandler() {
|
|
|
+ console.log(this.row);
|
|
|
+ let res = await this.$refs.form?.validate();
|
|
|
+ if (res) {
|
|
|
+ let payLoad = {};
|
|
|
+ let { remark } = this.form;
|
|
|
+ if (this.isEdit) {
|
|
|
+ let { taskProcessKey, taskNodeKey } = this.myFormData.resultMap;
|
|
|
+ payLoad.updateCommonEntityList = [
|
|
|
+ {
|
|
|
+ basicMap: {
|
|
|
+ tableName: "material_matching",
|
|
|
+ },
|
|
|
+ conditionMap: {
|
|
|
+ task_process_key: taskProcessKey,
|
|
|
+ task_node_key: taskNodeKey,
|
|
|
+ },
|
|
|
+ commMap: {
|
|
|
+ task_id: this.row.bepTaskPlanKey,
|
|
|
+ remark: remark,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ payLoad.insertCommonEntityList = [
|
|
|
+ {
|
|
|
+ basicMap: {
|
|
|
+ tableName: "material_matching",
|
|
|
+ },
|
|
|
+ addListMap: [
|
|
|
+ {
|
|
|
+ task_id: this.row.bepTaskPlanKey,
|
|
|
+ remark: remark,
|
|
|
+ taskProcessKey: this.row.benTaskProcessKey,
|
|
|
+ taskNodeKey: this.row.benTaskNodeKey,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ submitNodeForm(payLoad).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$modal.msgSuccess("保存成功");
|
|
|
+ } else {
|
|
|
+ this.$modal.error("保存失败,请稍后再试");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getFormData() {
|
|
|
+ let formData = {
|
|
|
+ flag: false,
|
|
|
+ msg: "",
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ let valid = await this.$refs.form.validate();
|
|
|
+ if (valid) {
|
|
|
+ formData.flag = true;
|
|
|
+ formData.data = this.form;
|
|
|
+ return formData;
|
|
|
+ } else {
|
|
|
+ formData.msg = "表单校验异常,请规范填写表单数据";
|
|
|
+ return formData;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ // console.log(error);
|
|
|
+ formData.msg = "表单校验异常,请规范填写表单数据";
|
|
|
+ return formData;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+::v-deep .el-button {
|
|
|
+ background: rgb(123, 213, 195);
|
|
|
+ border: rgb(123, 213, 195);
|
|
|
+ float: right;
|
|
|
+}
|
|
|
+</style>
|