Explorar el Código

fix:修改minio地址

lupeng hace 3 meses
padre
commit
e5c42dbdc7
Se han modificado 3 ficheros con 434 adiciones y 1 borrados
  1. 10 0
      src/api/process/index.ts
  2. 64 1
      src/views/quality/outsource/index.vue
  3. 360 0
      src/views/storage/entry/index.vue

+ 10 - 0
src/api/process/index.ts

@@ -48,3 +48,13 @@ export function sendTdm(
     data: params
   });
 }
+
+export function sendTdmTBom(
+  params: object
+): AxiosPromise<any> {
+  return request({
+    url: "/api/v1/process/outsource/bom",
+    method: "post",
+    data: params
+  });
+}

+ 64 - 1
src/views/quality/outsource/index.vue

@@ -45,7 +45,7 @@
           </template>
         </el-button>
         <el-button
-          v-if="row.state === '1' && row.sendState != '3'"
+          v-if="row.state === '1' && row.sendState==='1'"
           icon="el-icon-position"
           text
           @click="sendTdms(row.id)"
@@ -53,6 +53,15 @@
           :size="size"
           >发送TDM</el-button
         >
+        <el-button
+          v-if="row.state === '1'&& row.sendState==='0'"
+          icon="el-icon-position"
+          text
+          @click="sendTBom(row.id)"
+          type="primary"
+          :size="size"
+        >同步tBom</el-button
+        >
       </template>
     </avue-crud>
     <el-dialog
@@ -171,6 +180,28 @@
         <el-button type="primary" @click="audit">审 核</el-button>
       </div>
     </el-dialog>
+    <el-dialog  v-model="dialogTBom.visible"
+                :title="dialogTBom.title"
+                width="950px"
+                @close="dialog.visible = false">
+      <el-form>
+      <el-form-item label="附件上传">
+        <el-radio-group v-model="tBom.upload" class="ml-4">
+          <FilesUpload
+            v-model:src="fileUrl"
+            v-model:file-name-list="fileNameList"
+            :limit="1"
+            @finished="testFiles"
+          />
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item style="margin-left: 45%">
+        <el-button type="primary" @click="tdmUpload"
+        >保存</el-button
+        >
+      </el-form-item>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 <script setup>
@@ -182,7 +213,18 @@ import {
   queryOutSourceDetails,
   updateOutSourceApply,
   sendTdm,
+  sendTdmTBom,
 } from "@/api/process";
+
+const fileUrl = ref();
+const fileNameList = ref([]);
+const tBom=ref({});
+const testFiles = () => {
+  tBom.value.filePath = fileUrl.value;
+  tBom.value.fileName = fileNameList.value[0];
+  tBom.value.id=rowId.value;
+  console.log(tBom.value);
+};
 import { useCommonStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
@@ -207,6 +249,22 @@ const dialog = reactive({
   visible: false,
   type: 0,
 });
+const tdmUpload =()=>{
+  sendTdmTBom(tBom.value).then(
+   (data)=>{
+     if(data.code==='200'){
+       dialogTBom.visible=false;
+       tBom.value= {}
+     }
+   }
+  ).finally(
+
+  )
+}
+const dialogTBom = reactive({
+  title: "tBom同步到TDM",
+  visible: false,
+});
 const openDialog = (type, id) => {
   dialog.title = type === 0 ? "委外详情" : "委外审核";
   queryOutSourceDetails(id).then((data) => {
@@ -221,6 +279,11 @@ const openDialog = (type, id) => {
     dialog.type = type;
   });
 };
+const rowId =ref(null);
+const sendTBom =(id)=>{
+  rowId.value=id;
+  dialogTBom.visible=true;
+}
 const audit = () => {
   form.value.state = radio.value === 0 ? 1 : 2;
   updateOutSourceApply(form.value).then((data) => {

+ 360 - 0
src/views/storage/entry/index.vue

@@ -0,0 +1,360 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @size-change="dataList"
+      @current-change="dataList"
+      @selection-change="selectionChange"
+    >
+
+      <template #menu-right="{}">
+        <el-dropdown split-button
+          >入库单导入同步到WMS
+          <template #dropdown>
+            <el-dropdown-menu>
+              <el-dropdown-item
+                @click="downloadTemplate('/api/v1/base/material/template')"
+              >
+                <i-ep-download />下载模板
+              </el-dropdown-item>
+              <el-dropdown-item @click="importExcelData">
+                <i-ep-top />导入数据
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </template>
+        </el-dropdown>
+      </template>
+    </avue-crud>
+
+
+  </div>
+</template>
+<script setup lang="ts">
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import { syncAps } from "@/api/aps";
+import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import { ElMessage, ElMessageBox } from "element-plus";
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+const { dicts } = useDictionaryStore();
+const apsSync = () => {
+  ElMessageBox.confirm("是否同步所选中数据?", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  }).then(async () => {
+    let param = { type: 2, codes: toDeleteIds.value };
+    syncAps(param).then((data) => {
+      if (data.code === "200") {
+        ElMessage.success(data.msg);
+      } else {
+        ElMessage.error(data.msg);
+      }
+    });
+  });
+};
+
+
+
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/base/material",
+  });
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+// checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
+// const permission = reactive({
+//   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
+//   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
+//   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
+//   menu: true,
+// });
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const router = useRouter();
+const binding = (row) => {
+  router.push(`/base/bom/${row.materialCode}`);
+};
+onMounted(() => {
+  // 设置表格列或者其他自定义的option
+
+  dataList();
+});
+
+/**
+ * 上传excel相关
+ */
+const uploadRef = ref(null);
+const uploadFinished = () => {
+  // 上传完成后的刷新操作
+  page.currentPage = 1;
+  dataList();
+};
+const importExcelData = () => {
+  if (uploadRef.value) {
+    uploadRef.value.show("/api/v1/base/material/import");
+  }
+};
+
+option.value = Object.assign(option.value, {
+  selection: true,
+  addBtn: false,
+  editBtn: false,
+  viewBtn: false,
+  column: [
+    {
+      label: "物料编码",
+      prop: "materialCode",
+      width: 130,
+      overHidden: true,
+      search: true,
+      editDisabled: true,
+      rules: [
+        {
+          required: true,
+          message: "请填写物料编码",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "物料名称",
+      prop: "materialName",
+      width: 140,
+      overHidden: true,
+      search: true,
+      rules: [
+        {
+          required: true,
+          message: "请填写物料名称",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "物料属性",
+      prop: "attributeDictValue",
+      search: true,
+      filterable: true,
+      type: "select",
+      width: 100,
+      overHidden: true,
+      dicData: dicts.material_properties,
+      props: { label: "dictLabel", value: "dictValue" },
+      rules: [
+        {
+          required: true,
+          message: "请选择物料属性",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "物料规格",
+      prop: "spec",
+      width: 100,
+      overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "请填写物料规格",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "单位",
+      prop: "unitDictValue",
+      filterable: true,
+      type: "select",
+      dicData: dicts.danwei_type,
+      props: { label: "dictLabel", value: "dictValue" },
+      rules: [
+        {
+          required: true,
+          message: "请选择单位",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "物料级别",
+      prop: "levelDictValue",
+      search: true,
+      filterable: true,
+      type: "select",
+      width: 100,
+      overHidden: true,
+      dicData: dicts.material_level,
+      props: { label: "dictLabel", value: "dictValue" },
+      rules: [
+        {
+          required: true,
+          message: "请选择物料级别",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "生产厂家",
+      prop: "manufacturer",
+      width: 100,
+      overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "请填写生产厂家",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "质检方案",
+      prop: "inspectDictValue",
+      search: true,
+      filterable: true,
+      type: "select",
+      width: 100,
+      overHidden: true,
+      dicData: dicts.quality_testing_plan,
+      props: { label: "dictLabel", value: "dictValue" },
+    },
+    {
+      label: "适用平台",
+      prop: "applicablePlatformsDictValue",
+      search: true,
+      filterable: true,
+      type: "select",
+      width: 100,
+      overHidden: true,
+      dicData: dicts.applicable_platforms,
+      props: { label: "dictLabel", value: "dictValue" },
+      rules: [
+        {
+          required: true,
+          message: "请选择适用平台",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "质量等级",
+      prop: "qualityLevelDictValue",
+      search: true,
+      width: 100,
+      overHidden: true,
+      filterable: true,
+      type: "select",
+      dicData: dicts.quality_grade,
+      props: { label: "dictLabel", value: "dictValue" },
+      rules: [
+        {
+          required: true,
+          message: "请选择质量等级",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "选用类型",
+      prop: "selectionDictValue",
+      search: true,
+      filterable: true,
+      width: 100,
+      overHidden: true,
+      type: "select",
+      dicData: dicts.selection_type,
+      props: { label: "dictLabel", value: "dictValue" },
+    },
+    {
+      label: "产品阶段",
+      prop: "stageDictValue",
+      search: true,
+      filterable: true,
+      width: 100,
+      overHidden: true,
+      type: "select",
+      dicData: dicts.stage,
+      props: { label: "dictLabel", value: "dictValue" },
+    },
+    { label: "客户型号", prop: "customerModel", width: 100, overHidden: true },
+    {
+      label: "保质期(天)",
+      prop: "qualityGuaranteePeriod",
+      width: 100,
+      overHidden: true,
+      type: "number",
+      min: 0,
+    },
+    {
+      label: "封装方法",
+      prop: "packageDictValue",
+      search: true,
+      width: 100,
+      overHidden: true,
+      filterable: true,
+      type: "select",
+      dicData: dicts.packaging_method,
+      props: { label: "dictLabel", value: "dictValue" },
+    },
+
+    {
+      label: "是否工装",
+      prop: "frock",
+      search: true,
+      width: 90,
+      overHidden: true,
+      filterable: true,
+      type: "radio", //类型为单选框
+      dicData: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      value: "1",
+      rules: [
+        {
+          required: true,
+          message: "是否工装",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "筛选规范",
+      prop: "selectionSpec",
+      width: 150,
+      overHidden: true,
+      type: "textarea",
+      span: 18,
+    },
+
+    {
+      label: "备注",
+      prop: "remark",
+      width: 150,
+      overHidden: true,
+      type: "textarea",
+      span: 18,
+    },
+  ],
+});
+</script>