Browse Source

部分需求修改

cz 1 năm trước cách đây
mục cha
commit
594bf9022d
2 tập tin đã thay đổi với 57 bổ sung40 xóa
  1. 34 29
      src/views/JXSK/mes/forward/add.vue
  2. 23 11
      src/views/JXSK/mes/receive/add.vue

+ 34 - 29
src/views/JXSK/mes/forward/add.vue

@@ -36,7 +36,12 @@ const formData = reactive({
   },
 });
 const rules = {
-  receivedUserId: [{ required: true, message: proxy.t('forward.pleaseSelectThePersonInCharge') }],
+  receivedUserId: [
+    {
+      required: true,
+      message: proxy.t("forward.pleaseSelectThePersonInCharge"),
+    },
+  ],
 };
 const formOption = reactive({
   readonly: false, //用于控制整个表单是否只读
@@ -44,7 +49,7 @@ const formOption = reactive({
   labelAlign: "top",
   scroll: true,
   labelWidth: "62pk",
-  submitBtnText: proxy.t('common.submit'),
+  submitBtnText: proxy.t("common.submit"),
   btnConfig: {
     isNeed: false,
     prop: "list",
@@ -76,7 +81,7 @@ const onSubmit = () => {
     proxy.post("/productionTaskDetail/circulation", data).then(
       (res) => {
         setTimeout(() => {
-          showSuccessToast(proxy.t('common.operationSuccessful'));
+          showSuccessToast(proxy.t("common.operationSuccessful"));
           proxy.$router.push("/main/jxskForward");
         }, 500);
       },
@@ -90,7 +95,7 @@ const onSubmit = () => {
       .then(
         (res) => {
           setTimeout(() => {
-            showSuccessToast(proxy.t('common.operationSuccessful'));
+            showSuccessToast(proxy.t("common.operationSuccessful"));
             proxy.$router.push("/main/jxskForward");
           }, 500);
         },
@@ -115,78 +120,78 @@ const configData = [
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.productName'),
+      label: proxy.t("forward.productName"),
       prop: "productName",
       readonly: true,
     },
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.productSN'),
+      label: proxy.t("forward.productSN"),
       prop: "productSn",
       readonly: true,
     },
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.currentProcess'),
+      label: proxy.t("forward.currentProcess"),
       prop: "productionProcessesName",
       readonly: true,
     },
     {
       type: "slot",
-      label: proxy.t('forward.processDrawing'),
+      label: proxy.t("forward.processDrawing"),
       slotName: "file",
     },
     {
       type: "title",
-      title: proxy.t('forward.name'),
+      title: proxy.t("forward.name"),
     },
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.targetProcess'),
+      label: proxy.t("forward.targetProcess"),
       prop: "nextProductionProcessesName",
       readonly: true,
     },
-    {
-      type: "picker",
-      label: proxy.t('forward.personInCharge'),
-      prop: "receivedUserId",
-      itemType: "onePicker",
-      showPicker: false,
-      fieldNames: {
-        text: "label",
-        value: "value",
-      },
-      data: [],
-    },
+    // {
+    //   type: "picker",
+    //   label: proxy.t('forward.personInCharge'),
+    //   prop: "receivedUserId",
+    //   itemType: "onePicker",
+    //   showPicker: false,
+    //   fieldNames: {
+    //     text: "label",
+    //     value: "value",
+    //   },
+    //   data: [],
+    // },
   ],
   [
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.productName'),
+      label: proxy.t("forward.productName"),
       prop: "productName",
       readonly: true,
     },
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.productSN'),
+      label: proxy.t("forward.productSN"),
       prop: "productSn",
       readonly: true,
     },
     {
       type: "input",
       itemType: "text",
-      label: proxy.t('forward.currentProcess'),
+      label: proxy.t("forward.currentProcess"),
       prop: "productionProcessesName",
       readonly: true,
     },
     {
       type: "slot",
-      label: proxy.t('forward.processDrawing'),
+      label: proxy.t("forward.processDrawing"),
       slotName: "file",
     },
   ],
@@ -194,11 +199,11 @@ const configData = [
 onMounted(() => {
   if (route.query.type === "10") {
     formConfig.value = configData[0];
-    formOption.submitBtnText = proxy.t('common.submit');
-    getDict();
+    formOption.submitBtnText = proxy.t("common.submit");
+    // getDict();
   } else {
     formConfig.value = configData[1];
-    formOption.submitBtnText = proxy.t('forward.submitStorage');
+    formOption.submitBtnText = proxy.t("forward.submitStorage");
   }
   formData.data = { ...route.query };
 });

+ 23 - 11
src/views/JXSK/mes/receive/add.vue

@@ -34,9 +34,18 @@ const formData = reactive({
   },
 });
 const rules = {
-  warehouseName: [{ required: true, message: proxy.t('receive.warehouseNameCanNotBeEmpty') }],
-  productName: [{ required: true, message: proxy.t('receive.itemNameCanNotBeEmpty') }],
-  quantity: [{ required: true, message: proxy.t('receive.warehousingQuantityCanNotBeEmpty') }],
+  warehouseName: [
+    { required: true, message: proxy.t("receive.warehouseNameCanNotBeEmpty") },
+  ],
+  productName: [
+    { required: true, message: proxy.t("receive.itemNameCanNotBeEmpty") },
+  ],
+  quantity: [
+    {
+      required: true,
+      message: proxy.t("receive.warehousingQuantityCanNotBeEmpty"),
+    },
+  ],
 };
 const formOption = reactive({
   readonly: false, //用于控制整个表单是否只读
@@ -44,9 +53,9 @@ const formOption = reactive({
   labelAlign: "top",
   scroll: true,
   labelWidth: "62pk",
-  submitBtnText: proxy.t('receive.confirmReceipt'),
+  submitBtnText: proxy.t("receive.confirmReceipt"),
   otherBtn: true,
-  otherBtnText:  proxy.t('receive.return'),
+  otherBtnText: proxy.t("receive.return"),
   btnConfig: {
     isNeed: false,
     prop: "list",
@@ -60,28 +69,28 @@ const formConfig = reactive([
   {
     type: "input",
     itemType: "text",
-    label: proxy.t('receive.productName'),
+    label: proxy.t("receive.productName"),
     prop: "productName",
     readonly: true,
   },
   {
     type: "input",
     itemType: "text",
-    label: proxy.t('receive.productSN'),
+    label: proxy.t("receive.productSN"),
     prop: "productSn",
     readonly: true,
   },
   {
     type: "input",
     itemType: "text",
-    label: proxy.t('receive.previousProcess'),
+    label: proxy.t("receive.previousProcess"),
     prop: "productionProcessesName",
     readonly: true,
   },
   {
     type: "input",
     itemType: "text",
-    label: proxy.t('receive.circulationInto'),
+    label: proxy.t("receive.circulationInto"),
     prop: "circulationUserName",
     readonly: true,
   },
@@ -92,7 +101,7 @@ const onSubmit = () => {
   proxy.post("/productionTaskDetail/receive", { id: formData.data.id }).then(
     (res) => {
       setTimeout(() => {
-        showSuccessToast(proxy.t('common.operationSuccessful'));
+        showSuccessToast(proxy.t("common.operationSuccessful"));
         proxy.$router.push("/main/jxskReceive");
       }, 500);
     },
@@ -105,7 +114,7 @@ const otherBtnClick = () => {
   proxy.post("/productionTaskDetail/rejection", { id: formData.data.id }).then(
     (res) => {
       setTimeout(() => {
-        showSuccessToast(proxy.t('common.operationSuccessful'));
+        showSuccessToast(proxy.t("common.operationSuccessful"));
         proxy.$router.push("/main/jxskReceive");
       }, 500);
     },
@@ -127,6 +136,9 @@ const getDetails = () => {
 onMounted(() => {
   if (route.query.id) {
     formData.data = { ...route.query };
+    if (!formData.data.productionProcessesName) {
+      formOption.otherBtn = false;
+    }
   }
 });
 </script>