|
@@ -19,7 +19,6 @@
|
|
|
@current-change="dataList"
|
|
|
@selection-change="selectionChange"
|
|
|
>
|
|
|
-
|
|
|
<template #menu-left="{ size }">
|
|
|
<el-button
|
|
|
:disabled="toDeleteIds.length < 1"
|
|
@@ -305,6 +304,7 @@ import WorkOrderSeq from "./components/work-order-seq.vue";
|
|
|
import { checkPerm } from "@/directive/permission";
|
|
|
import { queryDictDataByType } from "@/api/system/dict";
|
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
+import request from "../../../utils/request.js";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
|
|
|
const tableRowClassName = ({ row, rowIndex }) => {
|
|
@@ -322,6 +322,7 @@ const test = () => {
|
|
|
isShowTable.value = true;
|
|
|
tableType.value = tableType.value == 1 ? 2 : 1;
|
|
|
};
|
|
|
+const uploadUrl = import.meta.env.VITE_APP_BASE_API + "/api/v1/base/importSeqs"
|
|
|
const processRouteType = ref("");
|
|
|
const permission = reactive({
|
|
|
delBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_del),
|
|
@@ -556,12 +557,18 @@ const { selectionChange, multipleDelete } = Methords; //选中和批量删除事
|
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
|
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
-
|
|
|
+function handleUploadSuccess(response, file, column) {
|
|
|
+ // 处理上传成功的逻辑,例如更新数据或显示提示信息
|
|
|
+ console.log('上传成功', response);
|
|
|
+ // 你可以在这里更新你的数据源或进行其他操作,例如:
|
|
|
+ // this.someData = response.data; // 假设response中包含了新的数据信息
|
|
|
+}
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
delBtn: false,
|
|
|
selection: true,
|
|
|
viewBtn: false,
|
|
|
+ labelWidth: 120,
|
|
|
editBtn: false,
|
|
|
column: [
|
|
|
{
|
|
@@ -768,6 +775,7 @@ option.value = Object.assign(option.value, {
|
|
|
label: "工单数量",
|
|
|
prop: "planNum",
|
|
|
width: 85,
|
|
|
+ editDisabled: true,
|
|
|
type: "number",
|
|
|
min: 1,
|
|
|
max: 99999,
|
|
@@ -779,7 +787,7 @@ option.value = Object.assign(option.value, {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- {
|
|
|
+ /*{
|
|
|
label: "自动拆单",
|
|
|
hide: true,
|
|
|
type: "switch",
|
|
@@ -796,7 +804,7 @@ option.value = Object.assign(option.value, {
|
|
|
value: 0,
|
|
|
editDisplay: false,
|
|
|
prop: "autoGenerate",
|
|
|
- },
|
|
|
+ },*/
|
|
|
{
|
|
|
label: "完成数量",
|
|
|
width: 85,
|
|
@@ -834,6 +842,42 @@ option.value = Object.assign(option.value, {
|
|
|
prop: "packageUrl",
|
|
|
hide: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '导入流转卡号',
|
|
|
+ type: 'upload', // 使用upload类型
|
|
|
+ prop: "file",
|
|
|
+ listType: "text",
|
|
|
+ showFileList: true,
|
|
|
+ editDisplay: false,
|
|
|
+ span: 24,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "文件不能为空",
|
|
|
+ trigger: "trigger",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ httpRequest: (async (file) => {
|
|
|
+ const formData = new FormData();
|
|
|
+ formData.append("file", file.file);
|
|
|
+ const res = await request({
|
|
|
+ url: "/api/v1/base/importSeqs",
|
|
|
+ method: "post",
|
|
|
+ data: formData,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "multipart/form-data",
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if(res.code === '200'){
|
|
|
+ form.value.seqList = res.data.seqs
|
|
|
+ form.value.file = res.data.name
|
|
|
+ }else{
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ form.value.seqList = []
|
|
|
+ form.value.file = ""
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
],
|
|
|
});
|
|
|
|