cz před 1 rokem
rodič
revize
05bdda7652

+ 1 - 0
src/components/notice/index.vue

@@ -306,6 +306,7 @@ const getPushInfo = () => {
     noticeData.value = res.rows;
     pushInfoReq.value.total = res.total;
     loading.value = false;
+    emit("changeNum", res.total * 1);
     // setTimeout(() => {
     //   loading.value = false;
     //   proxy

+ 11 - 44
src/views/JXSK/production/bom/index.vue

@@ -350,7 +350,7 @@ const config = computed(() => {
       attrs: {
         label: "操作",
         width: "200",
-        align: "right",
+        align: "center",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
@@ -377,49 +377,16 @@ const config = computed(() => {
               getDtl(row, "edit");
             },
           },
-          {
-            attrs: {
-              label: row.status === 1 ? "禁用" : "启用",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              ElMessageBox.confirm(
-                `是否${row.status === 1 ? "禁用" : "启用"} ?`,
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                proxy.post("/bomInfo/detail", { id: row.id }).then((res) => {
-                  res.bomDetailList = res.bomDetailVoList;
-                  res.status = row.status ? 0 : 1;
-                  formData.data = res;
-                  proxy.post("/bomInfo/edit", formData.data).then((res) => {
-                    ElMessage({
-                      message: "操作成功",
-                      type: "success",
-                    });
-                    getList();
-                  });
-                });
-              });
-            },
-          },
           // {
           //   attrs: {
-          //     label: "删除",
-          //     type: "danger",
+          //     label: row.status === 1 ? "禁用" : "启用",
+          //     type: "primary",
           //     text: true,
           //   },
           //   el: "button",
           //   click() {
-          //     // 弹窗提示是否删除
           //     ElMessageBox.confirm(
-          //       "此操作将永久删除该数据, 是否继续?",
+          //       `是否${row.status === 1 ? "禁用" : "启用"} ?`,
           //       "提示",
           //       {
           //         confirmButtonText: "确定",
@@ -427,18 +394,18 @@ const config = computed(() => {
           //         type: "warning",
           //       }
           //     ).then(() => {
-          //       // 删除
-          //       proxy
-          //         .post("/workshop/delete", {
-          //           id: row.id,
-          //         })
-          //         .then((res) => {
+          //       proxy.post("/bomInfo/detail", { id: row.id }).then((res) => {
+          //         res.bomDetailList = res.bomDetailVoList;
+          //         res.status = row.status ? 0 : 1;
+          //         formData.data = res;
+          //         proxy.post("/bomInfo/edit", formData.data).then((res) => {
           //           ElMessage({
-          //             message: "删除成功",
+          //             message: "操作成功",
           //             type: "success",
           //           });
           //           getList();
           //         });
+          //       });
           //     });
           //   },
           // },

+ 11 - 1
src/views/JXSK/production/forward/index.vue

@@ -59,7 +59,7 @@
           size="large"
           :loading="submitLoading"
         >
-          退 
+          退回任务池
         </el-button>
       </template>
     </el-dialog>
@@ -200,6 +200,16 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
+      itemType: "textarea",
+      prop: "productRemark",
+      label: "产品备注",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "input",
       itemType: "text",
       prop: "productionProcessesName",
       label: "当前工序",

+ 15 - 2
src/views/JXSK/production/plan/index.vue

@@ -216,6 +216,9 @@ const formConfig = computed(() => {
       fn: (val) => {
         changeFn(val);
       },
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "input",
@@ -224,7 +227,7 @@ const formConfig = computed(() => {
       label: "产品名称",
       disabled: true,
       style: {
-        width: "25%",
+        width: "50%",
       },
     },
     {
@@ -234,7 +237,7 @@ const formConfig = computed(() => {
       label: "待排程数量",
       disabled: true,
       style: {
-        width: "25%",
+        width: "50%",
       },
       isShow: modalType.value == "add",
     },
@@ -244,13 +247,20 @@ const formConfig = computed(() => {
       prop: "startDate",
       label: "计划开始时间",
       required: true,
+      style: {
+        width: "50%",
+      },
     },
+
     {
       type: "date",
       itemType: "date",
       prop: "stopDate",
       label: "计划结束时间",
       required: true,
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "number",
@@ -259,6 +269,9 @@ const formConfig = computed(() => {
       precision: 0,
       min: 1,
       controls: false,
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "slot",

+ 18 - 5
src/views/JXSK/production/receive/index.vue

@@ -51,7 +51,7 @@
           size="large"
           :loading="submitLoading"
         >
-          提 交
+          确认接收
         </el-button>
         <el-button
           type="danger"
@@ -60,7 +60,7 @@
           :loading="submitLoading"
           v-if="otherBtn"
         >
-          退 
+          退回前道工序
         </el-button>
       </template>
     </el-dialog>
@@ -200,6 +200,16 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
+      itemType: "textarea",
+      prop: "productRemark",
+      label: "产品备注",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "input",
       itemType: "text",
       prop: "productionProcessesName",
       label: "当前工序",
@@ -327,7 +337,7 @@ const submitForm = (flag) => {
 const submitType = ref("");
 const otherBtn = ref(true);
 const getDtl = (row) => {
-  if (!row.personLiableId) {
+  if (!row.previousProcessesId || row.previousProcessesId == -1) {
     otherBtn.value = false;
   } else {
     otherBtn.value = true;
@@ -335,10 +345,13 @@ const getDtl = (row) => {
   formOption.disabled = true;
   formData.data = { ...row };
   proxy.post("/productionTaskDetail/detail", { id: row.id }).then((res) => {
-    if (res && res.productionTaskDetailRecordList.length > 0) {
+    if (
+      res.productionTaskDetailRecordList &&
+      res.productionTaskDetailRecordList.length > 0
+    ) {
       let id = res.productionTaskDetailRecordList[0].id;
       proxy.post("/fileInfo/getList", { businessIdList: [id] }).then((res) => {
-        if (res && res[id].length > 0) {
+        if (res[id] && res[id].length > 0) {
           formData.data.fileList = res[id].map((item) => {
             return {
               raw: item,

+ 23 - 5
src/views/JXSK/production/task/index.vue

@@ -236,6 +236,9 @@ const formConfig = computed(() => {
       fn: (val) => {
         changeFn(val);
       },
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "input",
@@ -244,7 +247,7 @@ const formConfig = computed(() => {
       label: "产品名称",
       disabled: true,
       style: {
-        width: "25%",
+        width: "50%",
       },
     },
     {
@@ -254,7 +257,7 @@ const formConfig = computed(() => {
       label: "待排程数量",
       disabled: true,
       style: {
-        width: "25%",
+        width: "50%",
       },
     },
     {
@@ -264,6 +267,9 @@ const formConfig = computed(() => {
       precision: 0,
       min: 1,
       controls: false,
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "date",
@@ -271,6 +277,9 @@ const formConfig = computed(() => {
       prop: "dueDate",
       label: "完成期限",
       required: true,
+      style: {
+        width: "50%",
+      },
     },
   ];
 });
@@ -286,6 +295,9 @@ const formConfigOne = computed(() => {
       fn: (val) => {
         changeFn(val);
       },
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "input",
@@ -294,7 +306,7 @@ const formConfigOne = computed(() => {
       label: "产品名称",
       disabled: true,
       style: {
-        width: "25%",
+        width: "50%",
       },
     },
     {
@@ -304,7 +316,7 @@ const formConfigOne = computed(() => {
       label: "待排程数量",
       disabled: true,
       style: {
-        width: "25%",
+        width: "50%",
       },
       isShow: modalType.value == "add",
     },
@@ -315,6 +327,9 @@ const formConfigOne = computed(() => {
       precision: 0,
       min: 1,
       controls: false,
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "date",
@@ -322,6 +337,9 @@ const formConfigOne = computed(() => {
       prop: "dueDate",
       label: "完成期限",
       required: true,
+      style: {
+        width: "50%",
+      },
     },
     {
       type: "slot",
@@ -445,7 +463,7 @@ const getDict = () => {
     })
     .then((res) => {
       planData.value = res.rows.map((x) => ({
-        label: x.code,
+        label: x.code + `(${x.startDate}-${x.stopDate})`,
         value: x.id,
         ...x,
       }));

+ 97 - 64
src/views/JXSK/production/workOrder/index.vue

@@ -46,7 +46,7 @@
             <el-progress
               type="circle"
               :percentage="Number(item.completionRate)"
-              width="100"
+              width="60"
               :status="Number(item.completionRate) == 100 ? 'success' : ''"
             />
           </div>
@@ -360,7 +360,12 @@ import { computed, defineComponent, nextTick, ref } from "vue";
 import useUserStore from "@/store/modules/user";
 import SelectMaterial from "@/components/product/SelectMaterial";
 import Sortable from "sortablejs";
-
+const props = defineProps({
+  isShowSelect: {
+    type: Boolean,
+    default: false,
+  },
+});
 const uploadData = ref({});
 let fileList = ref([]);
 let fileListCopy = ref([]);
@@ -387,6 +392,14 @@ let rulesOne = ref({
   name: [{ required: true, message: "请输入工序名称", trigger: "blur" }],
   remarks: [{ required: true, message: "请输入工艺说明", trigger: "blur" }],
 });
+let rulesTwo = ref({
+  stockWaitQuantity: [
+    { required: true, message: "请输入出库数量", trigger: "blur" },
+  ],
+  productionQuantity: [
+    { required: true, message: "请输入生产数量", trigger: "blur" },
+  ],
+});
 const { proxy } = getCurrentInstance();
 const materialUnit = ref([]);
 const workOrderSource = ref([]);
@@ -480,7 +493,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "计划出库数量",
-        prop: "aa",
+        prop: "stockWaitQuantity",
         width: 120,
       },
     },
@@ -517,77 +530,93 @@ const config = computed(() => {
         label: "操作",
         width: "220",
         align: "center",
+        fixed: "right",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
-        return [
-          row.isCustomized == 1 && (row.bomStatus == 0 || row.bomStatus == null)
-            ? {
-                attrs: {
-                  label: "调整BOM",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  getDtl(row, false);
-                },
-              }
-            : {},
-          row.isCustomized == 1 && row.bomStatus
-            ? {
-                attrs: {
-                  label: "查看BOM",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  getDtl(row, true);
-                },
-              }
-            : {},
-          row.isCustomized == 1 &&
-          (row.technologyStatus == 0 || row.technologyStatus == null)
-            ? {
-                attrs: {
-                  label: "调整工艺",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  getDtlOne(row, false);
-                },
-              }
-            : {},
-          row.isCustomized == 1 && row.technologyStatus
-            ? {
-                attrs: {
-                  label: "查看工艺",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  getDtlOne(row, true);
-                },
-              }
-            : {},
-          row.productionQuantity == null
-            ? {
+        return !props.isShowSelect
+          ? [
+              row.isCustomized == 1 &&
+              (row.bomStatus == 0 || row.bomStatus == null)
+                ? {
+                    attrs: {
+                      label: "调整BOM",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      getDtl(row, false);
+                    },
+                  }
+                : {},
+              row.isCustomized == 1 && row.bomStatus
+                ? {
+                    attrs: {
+                      label: "查看BOM",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      getDtl(row, true);
+                    },
+                  }
+                : {},
+              row.isCustomized == 1 &&
+              (row.technologyStatus == 0 || row.technologyStatus == null)
+                ? {
+                    attrs: {
+                      label: "调整工艺",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      getDtlOne(row, false);
+                    },
+                  }
+                : {},
+              row.isCustomized == 1 && row.technologyStatus
+                ? {
+                    attrs: {
+                      label: "查看工艺",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      getDtlOne(row, true);
+                    },
+                  }
+                : {},
+              row.productionQuantity == null
+                ? {
+                    attrs: {
+                      label: "下发",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      handleOut(row);
+                    },
+                  }
+                : {},
+            ]
+          : [
+              {
                 attrs: {
-                  label: "下发",
+                  label: "选择",
                   type: "primary",
                   text: true,
                 },
                 el: "button",
                 click() {
-                  handleOut(row);
+                  handleSelectRow(row);
                 },
-              }
-            : {},
-        ];
+              },
+            ];
       },
     },
   ];
@@ -1030,6 +1059,10 @@ const submitFormTwo = (type) => {
     );
   });
 };
+
+const handleSelectRow = (row) => {
+  proxy.$emit("handleSelectRow", row);
+};
 </script>
   
 <style lang="scss" scoped>

+ 8 - 7
src/views/product/material/index.vue

@@ -172,6 +172,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "图片",
+        prop: "unit",
+        slot: "pic",
+      },
+    },
+    {
+      attrs: {
         label: "物料类型",
         prop: "type",
       },
@@ -185,13 +192,7 @@ const config = computed(() => {
         prop: "code",
       },
     },
-    {
-      attrs: {
-        label: "图片",
-        prop: "unit",
-        slot: "pic",
-      },
-    },
+
     {
       attrs: {
         label: "物料名称",

+ 10 - 6
src/views/product/product/index2.vue

@@ -164,8 +164,16 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "图片",
+        slot: "pic",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
         label: "产品类型",
         prop: "type",
+        width: 100,
       },
       render(type) {
         return proxy.dictDataEcho(type, productType.value);
@@ -177,12 +185,7 @@ const config = computed(() => {
         prop: "code",
       },
     },
-    {
-      attrs: {
-        label: "图片",
-        slot: "pic",
-      },
-    },
+
     {
       attrs: {
         label: "产品名称",
@@ -199,6 +202,7 @@ const config = computed(() => {
       attrs: {
         label: "单位",
         prop: "unit",
+        width: 100,
       },
       render(unit) {
         return proxy.dictValueLabel(unit, productUnit.value);

+ 67 - 0
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -33,6 +33,16 @@
         :rules="rules"
         ref="submit"
       >
+        <template #workOrderId>
+          <div style="width: 100%">
+            <el-button type="primary" @click="openOrder = true"
+              >选择工单</el-button
+            >
+            <div style="margin-top: 10px" v-if="selectOrder">
+              已选择: {{ selectOrder }}
+            </div>
+          </div>
+        </template>
         <template #details>
           <div style="width: 100%">
             <el-button type="primary" @click="clickAdd()">添加明细</el-button>
@@ -128,6 +138,20 @@
       >
       </InventoryInquiry>
     </el-dialog>
+
+    <el-dialog
+      v-model="openOrder"
+      title="工单选择"
+      width="80%"
+      append-to-body
+      destroy-on-close
+    >
+      <WorkOrder :isShowSelect="true" @handleSelectRow="handleSelectRow">
+      </WorkOrder>
+      <template #footer>
+        <el-button @click="openOrder = false" size="large">取 消</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -137,6 +161,8 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
 import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index";
+import WorkOrder from "@/views/JXSK/production/workOrder/index";
+import useUserStore from "@/store/modules/user";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
@@ -288,18 +314,42 @@ const formConfig = computed(() => {
     },
     {
       type: "slot",
+      slotName: "workOrderId",
+      label: "绑定工单",
+    },
+    {
+      type: "slot",
       slotName: "details",
       label: "出库明细",
     },
+    {
+      type: "input",
+      prop: "exWarehousePerson",
+      label: "出库人",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "receivingPerson",
+      label: "接收人",
+      itemWidth: 50,
+    },
   ];
 });
 const rules = ref({
   warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
   quantity: [{ required: true, message: "请输入出库数量", trigger: "blur" }],
+  exWarehousePerson: [
+    { required: true, message: "请输入出库人", trigger: "blur" },
+  ],
+  receivingPerson: [
+    { required: true, message: "请输入接收人", trigger: "blur" },
+  ],
 });
 const openModal = () => {
   formData.data = {
     type: "2",
+    exWarehousePerson: useUserStore().user.nickName,
     list: [],
   };
   loadingDialog.value = false;
@@ -357,6 +407,12 @@ const pushGoods = (goods) => {
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
+    if (!formData.data.workOrderId) {
+      return ElMessage({
+        message: "请绑定工单!",
+        type: "info",
+      });
+    }
     if (formData.data.list && formData.data.list.length > 0) {
       for (let i = 0; i < formData.data.list.length; i++) {
         if (
@@ -388,6 +444,17 @@ const submitForm = () => {
 const handleDelete = (index) => {
   formData.data.list.splice(index, 1);
 };
+const openOrder = ref(false);
+const selectOrder = ref("");
+const handleSelectRow = (row) => {
+  formData.data.workOrderId = row.id;
+  selectOrder.value = row.code;
+  ElMessage({
+    message: "选择成功",
+    type: "success",
+  });
+  openOrder.value = false;
+};
 </script>
 
 <style lang="scss" scoped>

+ 72 - 19
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -10,6 +10,26 @@
         highlight-current-row
         @get-list="getList"
       >
+        <template #productType="{ item }">
+          <div>
+            <div v-if="item.productDefinition == 1">
+              {{ dictValueLabel(item.productType, productType) }}
+            </div>
+            <div v-else>
+              {{ dictValueLabel(item.productType, materialType) }}
+            </div>
+          </div>
+        </template>
+        <template #unit="{ item }">
+          <div>
+            <div v-if="item.productDefinition == 1">
+              {{ dictValueLabel(item.productUnit, productUnit) }}
+            </div>
+            <div v-else>
+              {{ dictValueLabel(item.productUnit, materialUnit) }}
+            </div>
+          </div>
+        </template>
       </byTable>
     </div>
 
@@ -43,11 +63,15 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
+import useUserStore from "@/store/modules/user";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
 const productType = ref([]);
 const productUnit = ref([]);
+const materialType = ref([]);
+const materialUnit = ref([]);
+
 const status = ref([
   {
     label: "待出库",
@@ -143,12 +167,12 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品类型",
-        prop: "productType",
+        slot: "productType",
         width: 120,
       },
-      render(type) {
-        return proxy.dictValueLabel(type, productType.value);
-      },
+      // render(type) {
+      //   return proxy.dictValueLabel(type, productType.value);
+      // },
     },
     {
       attrs: {
@@ -174,11 +198,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "单位",
-        prop: "productUnit",
-        width: 120,
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
+        width: 100,
+        slot: "unit",
       },
     },
     {
@@ -235,16 +256,27 @@ const getDict = () => {
       });
     }
   });
-  proxy.getDictOne(["product_type", "unit"]).then((res) => {
-    productType.value = res["product_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne(["product_type", "unit", "material_type", "material_unit"])
+    .then((res) => {
+      productType.value = res["product_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      productUnit.value = res["unit"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+
+      materialType.value = res["material_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      materialUnit.value = res["material_unit"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -327,6 +359,18 @@ const formConfig = computed(() => {
       min: 1,
       controls: false,
     },
+    {
+      type: "input",
+      prop: "exWarehousePerson",
+      label: "出库人",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "receivingPerson",
+      label: "接收人",
+      itemWidth: 50,
+    },
   ];
 });
 const rules = ref({
@@ -334,6 +378,12 @@ const rules = ref({
   warehousingQuantity: [
     { required: true, message: "请输入出库数量", trigger: "blur" },
   ],
+  exWarehousePerson: [
+    { required: true, message: "请输入出库人", trigger: "blur" },
+  ],
+  receivingPerson: [
+    { required: true, message: "请输入接收人", trigger: "blur" },
+  ],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {
@@ -349,6 +399,8 @@ const submitForm = () => {
         id: formData.data.id,
         warehouseId: formData.data.warehouseId,
         quantity: formData.data.warehousingQuantity,
+        exWarehousePerson: formData.data.exWarehousePerson,
+        receivingPerson: formData.data.receivingPerson,
       })
       .then(
         () => {
@@ -368,6 +420,7 @@ const submitForm = () => {
 };
 const clickOperation = (row) => {
   formData.data = row;
+  formData.data.exWarehousePerson = useUserStore().user.nickName;
   loadingDialog.value = false;
   dialogVisible.value = true;
 };

+ 1 - 1
vite.config.js

@@ -45,7 +45,7 @@ export default defineConfig(({
         },
         '/byteSailing': {
           // 正式地址
-          // target:" http://139.9.102.170:10021/prod-api",
+          target: "http://139.9.102.170:10021/prod-api",
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/byteSailing/, '')
         }