Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
cad994e7e2
|
|
@ -127,6 +127,14 @@ export default {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
daorumioitem: {
|
||||||
|
name: "导入",
|
||||||
|
req: async function(id,data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/inm/mio/${id}/daoru_mioitem/`,data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 出入库明细
|
// 出入库明细
|
||||||
mioitem: {
|
mioitem: {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<slot :open="open">
|
<slot :open="open">
|
||||||
<el-button type="primary" plain @click="open">导入</el-button>
|
<el-button type="primary" plain @click="open">{{ name }}</el-button>
|
||||||
</slot>
|
</slot>
|
||||||
<el-dialog v-model="dialog" title="导入" :width="550" :close-on-click-modal="false" append-to-body destroy-on-close>
|
<el-dialog v-model="dialog" title="导入" :width="550" :close-on-click-modal="false" append-to-body destroy-on-close>
|
||||||
<el-progress v-if="loading" :text-inside="true" :stroke-width="20" :percentage="percentage" style="margin-bottom: 15px;"/>
|
<el-progress v-if="loading" :text-inside="true" :stroke-width="20" :percentage="percentage" style="margin-bottom: 15px;"/>
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
export default {
|
export default {
|
||||||
emits: ['success'],
|
emits: ['success'],
|
||||||
props: {
|
props: {
|
||||||
|
name: { type: String, default: "导入" },
|
||||||
apiObj: { type: Object, default: () => {} },
|
apiObj: { type: Object, default: () => {} },
|
||||||
data: { type: Object, default: () => {} },
|
data: { type: Object, default: () => {} },
|
||||||
accept: { type: String, default: ".xls, .xlsx" },
|
accept: { type: String, default: ".xls, .xlsx" },
|
||||||
|
|
@ -66,7 +67,7 @@
|
||||||
dialog: false,
|
dialog: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
formData: {}
|
formData: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,14 @@
|
||||||
@click="table_pack"
|
@click="table_pack"
|
||||||
v-if="mioObj.state == 10&&mode!=='show'&&type=='sale_out'&&project_code=='bxerp'"
|
v-if="mioObj.state == 10&&mode!=='show'&&type=='sale_out'&&project_code=='bxerp'"
|
||||||
>装箱</el-button>
|
>装箱</el-button>
|
||||||
|
<scFileImport
|
||||||
|
:templateUrl="mioitemT"
|
||||||
|
:name = "'导入明细'"
|
||||||
|
accept=".xlsx"
|
||||||
|
:apiObj="$API.common.upload"
|
||||||
|
@success="upSuccess1"
|
||||||
|
>
|
||||||
|
</scFileImport>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 8px"></div>
|
<div style="height: 8px"></div>
|
||||||
<scTable
|
<scTable
|
||||||
|
|
@ -381,6 +389,7 @@ export default {
|
||||||
wprVisibleDrawer:false,
|
wprVisibleDrawer:false,
|
||||||
printer_name:localStorage.getItem("printer_name"),
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
checkTemplate: " /media/default/template/mioitemw_t.xlsx",
|
checkTemplate: " /media/default/template/mioitemw_t.xlsx",
|
||||||
|
mioitemT: "/media/default/template/出入库明细.xlsx"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -636,6 +645,21 @@ export default {
|
||||||
that.$refs.packDialog.open();
|
that.$refs.packDialog.open();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
upSuccess1(res, close) {
|
||||||
|
var that = this;
|
||||||
|
close();
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
fullscreen: true,
|
||||||
|
text: "解析中...请稍等",
|
||||||
|
});
|
||||||
|
this.$API.inm.mio.req(that.mioId, { path: res.path }).then((res) => {
|
||||||
|
loading.close();
|
||||||
|
this.$message.success("导入成功");
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
}).catch((err) => {
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue