Bläddra i källkod

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

cz 1 år sedan
förälder
incheckning
9c42f17f27

+ 10 - 1
src/components/process/Contract.vue

@@ -505,12 +505,21 @@ const formData = reactive({
   },
 });
 const submit = ref(null);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
-  disabled: false,
+  disabled: judgeStatus()
 });
 const formConfig = computed(() => {
   return [

+ 10 - 0
src/components/process/EHSD/Contract.vue

@@ -520,11 +520,21 @@ const formData = reactive({
   },
 });
 const submit = ref(null);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
+  disabled: judgeStatus()
 });
 const uploadData = ref({});
 const indicationUploadData = ref({});

+ 10 - 0
src/components/process/EHSD/PriceSheet.vue

@@ -396,11 +396,21 @@ const formData = reactive({
   },
 });
 const submit = ref(null);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
+  disabled: judgeStatus()
 });
 const formConfig = computed(() => {
   return [

+ 21 - 1
src/components/process/EHSD/Purchase.vue

@@ -362,7 +362,10 @@
           </el-row>
           <div style="margin-top: 20px; width: 100%">
             <el-form-item label="条款内容" prop="remark">
-              <Editor style="width: 100%" :value="formData.data.remark" @updateValue="updateContent" ref="remarkEditor" />
+              <div v-if="judgeStatus()">
+                <div v-html="getStyle(formData.data.remark)"></div>
+              </div>
+              <Editor v-else style="width: 100%" :value="formData.data.remark" @updateValue="updateContent" ref="remarkEditor" />
             </el-form-item>
           </div>
         </div>
@@ -494,11 +497,21 @@ const productType = ref([
     value: 2,
   },
 ]);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
+  disabled: judgeStatus(),
 });
 const formConfig = computed(() => {
   return [
@@ -1149,6 +1162,13 @@ const selectMaterial = (goods) => {
     return ElMessage("选择错误");
   }
 };
+const getStyle = (text) => {
+  if (text) {
+    return text.replace(/\n|\r\n/g, "<br>");
+  } else {
+    return "";
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 10 - 0
src/components/process/EHSD/Sample.vue

@@ -518,11 +518,21 @@ const formData = reactive({
   },
 });
 const submit = ref(null);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
+  disabled: judgeStatus()
 });
 const uploadData = ref({});
 const indicationUploadData = ref({});

+ 10 - 0
src/components/process/PriceSheet.vue

@@ -371,11 +371,21 @@ const formData = reactive({
   },
 });
 const submit = ref(null);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
+  disabled: judgeStatus()
 });
 const formConfig = computed(() => {
   return [

+ 25 - 1
src/components/process/ServiceContract.vue

@@ -116,7 +116,10 @@
       </template>
       <template #sellerOther>
         <div style="width: 100%">
-          <Editor :value="formData.data.remark" @updateValue="updateContentSeller" />
+          <div v-if="judgeStatus()">
+            <div v-html="getStyle(formData.data.remark)"></div>
+          </div>
+          <Editor v-else :value="formData.data.remark" @updateValue="updateContentSeller" />
         </div>
       </template>
       <template #commodity>
@@ -332,6 +335,10 @@ import { ElMessage } from "element-plus";
 import Editor from "@/components/Editor/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
 
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
 const fundsPaymentMethod = ref([]);
@@ -353,11 +360,21 @@ const formData = reactive({
   },
 });
 const submit = ref(null);
+const judgeStatus = () => {
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
+  disabled: judgeStatus(),
 });
 const formConfig = computed(() => {
   return [
@@ -845,6 +862,13 @@ defineExpose({
   submitData: formData.data,
   handleSubmit,
 });
+const getStyle = (text) => {
+  if (text) {
+    return text.replace(/\n|\r\n/g, "<br>");
+  } else {
+    return "";
+  }
+};
 </script>
 
 <style lang="scss" scoped>