From 1e653db94c24389cc7615fd4a7ef1d63b00af534 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期五, 13 六月 2025 11:39:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/tms/modules/preparationOrder/PreparationOrderDetailModal.vue |  143 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 143 insertions(+), 0 deletions(-)

diff --git a/src/views/tms/modules/preparationOrder/PreparationOrderDetailModal.vue b/src/views/tms/modules/preparationOrder/PreparationOrderDetailModal.vue
new file mode 100644
index 0000000..a282342
--- /dev/null
+++ b/src/views/tms/modules/preparationOrder/PreparationOrderDetailModal.vue
@@ -0,0 +1,143 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="鍑嗗鍗曞彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="preparationOrderId">
+              <a-input v-model="model.preparationOrderId"placeholder="璇疯緭鍏ュ噯澶囧崟鍙�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍒�鍏风紪鐮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolCode">
+              <a-input v-model="model.toolCode"placeholder="璇疯緭鍏ュ垁鍏风紪鐮�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍒�鍏风紪鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolId">
+              <a-input v-model="model.toolId"placeholder="璇疯緭鍏ュ垁鍏风紪鍙�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鐢宠鍑哄簱鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundQuantity">
+              <a-input-number v-model="model.outboundQuantity"placeholder="璇疯緭鍏ョ敵璇峰嚭搴撴暟閲�" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="绉熸埛鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
+              <a-input v-model="model.tenantId"placeholder="璇疯緭鍏ョ鎴峰彿" ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: "PreparationOrderDetailModal",
+    components: {
+    },
+    props:{
+      mainId:{
+        type:String,
+        required:false,
+        default:''
+      }
+    },
+    data () {
+      return {
+        title:"鎿嶄綔",
+        width:800,
+        visible: false,
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/tms/preparationOrder/addPreparationOrderDetail",
+          edit: "/tms/preparationOrder/editPreparationOrderDetail",
+        }
+
+      }
+    },
+    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;
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        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';
+            }
+            this.model['preparationOrderId'] = this.mainId
+            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;
+              that.close();
+            })
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>

--
Gitblit v1.9.3