From e14ed882d12df3b48e59390eba364442cdff70bd Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期三, 28 五月 2025 15:46:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue |  121 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 121 insertions(+), 0 deletions(-)

diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue
new file mode 100644
index 0000000..5004198
--- /dev/null
+++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue
@@ -0,0 +1,121 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="澶瑰叿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixtureInformation">
+              <a-input v-model="model.fixtureInformation" placeholder="璇疯緭鍏ュす鍏�"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍥剧墖" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture">
+              <j-image-upload isMultiple :number="1" v-model="model.picture" ></j-image-upload>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="璇存槑淇℃伅" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remake">
+              <a-textarea v-model="model.remake" rows="4" placeholder="璇疯緭鍏ヨ鏄庝俊鎭�" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'GuideCardBatchForm',
+    components: {
+    },
+    props: {
+      //琛ㄥ崟绂佺敤
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           fixtureInformation: [
+              { required: true, message: '璇疯緭鍏ュす鍏�!'},
+           ],
+           picture: [
+              { required: true, message: '璇疯緭鍏ュ浘鐗�!'},
+           ],
+           remake: [
+              { required: true, message: '璇疯緭鍏ヨ鏄庝俊鎭�!'},
+           ],
+        },
+        url: {
+          edit: "/dnc/guideCardBatch/edit",
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //澶囦唤model鍘熷鍊�
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3