From 7f1c44f87f436efa73e061f458c1bb825acfb5f3 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 23 十月 2025 10:23:25 +0800
Subject: [PATCH] #
---
src/main/webapp/views/erpMaterialuse/materialuse.html | 162 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 131 insertions(+), 31 deletions(-)
diff --git a/src/main/webapp/views/erp/materialuse/index.html b/src/main/webapp/views/erpMaterialuse/materialuse.html
similarity index 74%
rename from src/main/webapp/views/erp/materialuse/index.html
rename to src/main/webapp/views/erpMaterialuse/materialuse.html
index 637242c..087b7d0 100644
--- a/src/main/webapp/views/erp/materialuse/index.html
+++ b/src/main/webapp/views/erpMaterialuse/materialuse.html
@@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <link rel="stylesheet" href="../../../static/evn/index.css">
+ <link rel="stylesheet" href="../../static/evn/index.css">
</head>
<body>
@@ -27,7 +27,7 @@
<el-input v-model="tableSearchParam.soCode" placeholder="璇疯緭鍏ョ敓浜у崟鍙�"></el-input>
</el-form-item>
<el-form-item label="杞﹂棿">
- <el-select v-model="tableSearchParam.depId" placeholder="閫夋嫨杞﹂棿" style="width: 240px" >
+ <el-select v-model="tableSearchParam.depId" placeholder="閫夋嫨杞﹂棿" style="width: 150px" >
<el-option
v-for="item in options"
:key="item.value"
@@ -37,7 +37,7 @@
</el-select>
</el-form-item>
<el-form-item label="鏄惁鎵撳嵃">
- <el-select v-model="tableSearchParam.izPrint" placeholder="" style="width: 240px" >
+ <el-select v-model="tableSearchParam.izPrint" placeholder="鏄惁鎵撳嵃" style="width: 150px" >
<el-option
v-for="item in printOptions"
:key="item.value"
@@ -54,22 +54,22 @@
</el-form>
<el-form :inline="true">
<el-form-item label="">
- <el-button type="primary" @click="fnPrintView('鍚�',0)">鎵撳嵃棰勮</el-button>
+ <el-button type="primary" @click="fnPrintView('鍚�')">鎵撳嵃棰勮</el-button>
</el-form-item>
<el-form-item label="">
- <el-button type="primary">鎵撳嵃</el-button>
+ <el-button type="primary" @click="fnPrint('鏄�')">鎵撳嵃</el-button>
</el-form-item>
<el-form-item label="">
- <el-button type="primary">鎾ら攢鐢熸垚</el-button>
+ <el-button type="primary" @click="fnCanelPrint()">鎾ら攢鐢熸垚</el-button>
</el-form-item>
<el-form-item label="">
- <el-button type="primary">鎵撳嵃棰勮(绾㈠瓧)</el-button>
+ <el-button type="primary" @click="fnPrintRedView('鍚�')">鎵撳嵃棰勮(绾㈠瓧)</el-button>
</el-form-item>
<el-form-item label="">
- <el-button type="primary">鎵撳嵃(绾㈠瓧)</el-button>
+ <el-button type="primary" @click="fnPrintRed('鏄�')">鎵撳嵃(绾㈠瓧)</el-button>
</el-form-item>
<el-form-item label="">
- <el-button type="primary">鎾ら攢鐢熸垚(绾㈠瓧)</el-button>
+ <el-button type="primary" @click="fnCanelPrintRed()">鎾ら攢鐢熸垚(绾㈠瓧)</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" border style="width: 100%" row-key="finterid" @selection-change="handleSelectionChange" max-height="650">
@@ -83,9 +83,9 @@
</el-table-column>
<el-table-column prop="invCode" label="鐗╂枡缂栫爜">
</el-table-column>
- <el-table-column prop="invName" label="鐗╂枡鍚嶇О" width="300" show-overflow-tooltip="true">
+ <el-table-column prop="invName" label="鐗╂枡鍚嶇О" width="300" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column prop="invStd" label="瑙勬牸" width="200" show-overflow-tooltip="true">
+ <el-table-column prop="invStd" label="瑙勬牸" width="200" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="depName" label="杞﹂棿">
</el-table-column>
@@ -111,15 +111,15 @@
</el-card>
</div>
- <script type="text/javascript" src="../../../static/js/jquery/jquery-3.3.1.min.js"></script>
- <script type="text/javascript" src="../../../static/js/common.js" charset="utf-8"></script>
- <script src="../../../static/evn/vue.global.js"></script>
- <script src="../../../static/evn/element-plus.js"></script>
- <script src="../../../static/evn/icons-vue.js"></script>
- <script src='../LodopFuncs.js'></script>
+ <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+ <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+ <script src="../../static/evn/vue.global.js"></script>
+ <script src="../../static/evn/element-plus.js"></script>
+ <script src="../../static/evn/icons-vue.js"></script>
+ <script src='../../static/js/erp/LodopFuncs.js'></script>
<script type="module">
// 瀵煎叆涓枃璇█鍖�
- import zhCn from '../zh-cn.js';
+ import zhCn from '../../static/js/erp/zh-cn.js';
const { createApp, ref, onMounted, onBeforeMount ,watchEffect} = Vue;
@@ -149,7 +149,7 @@
depName.value = item.label
}
})
- console.log(depName.value)
+
})
const printOptions = [
@@ -199,20 +199,30 @@
});
}
- function getDepOptions(){
+ function fnCanelPrint(){
+ const loading = ElementPlus.ElLoading.service({
+ lock: true,
+ text: 'Loading',
+ background: 'rgba(0, 0, 0, 0.7)',
+ })
$.ajax({
- url: "http://127.0.0.1:9090/basicinfo/departmentl/getlistfordropdown",
+ url:"http://127.0.0.1:9090/mo/materialuse/canelprint",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: JSON.stringify(selectList.value),
+ dataType: 'json',
contentType: 'application/json;charset=UTF-8',
- method: 'GET',
+ method: 'POST',
success: function(res) {
+ loading.close();
if (res.code == 200) {
- res.data.map(item => {
- console.log(item)
- options.value.push({
- value: item.depId, label: item.depName
- })
- console.log(options.value)
- })
+ ElementPlus.ElMessage({
+ message: "鎾ら攢鎴愬姛",
+ type: 'success'
+ });
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
} else {
ElementPlus.ElMessage({
message: res.msg,
@@ -223,7 +233,92 @@
});
}
- function fnPrintView(izPrint,izRed){
+ function fnCanelPrintRed(){
+ const loading = ElementPlus.ElLoading.service({
+ lock: true,
+ text: 'Loading',
+ background: 'rgba(0, 0, 0, 0.7)',
+ })
+ $.ajax({
+ url:"http://127.0.0.1:9090/mo/materialuse/canelprint1",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: JSON.stringify(selectList.value),
+ dataType: 'json',
+ contentType: 'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function(res) {
+ loading.close();
+ if (res.code == 200) {
+ ElementPlus.ElMessage({
+ message: "鎾ら攢鎴愬姛",
+ type: 'success'
+ });
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ ElementPlus.ElMessage({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ }
+
+ function getDepOptions(){
+ $.ajax({
+ url: "http://127.0.0.1:9090/basicinfo/departmentl/getlistfordropdown",
+ contentType: 'application/json;charset=UTF-8',
+ method: 'GET',
+ success: function(res) {
+ if (res.code == 200) {
+ res.data.map(item => {
+ options.value.push({
+ value: item.depId, label: item.depName
+ })
+ })
+ } else {
+ ElementPlus.ElMessage({
+ message: res.msg,
+ type: 'error'
+ });
+ }
+ }
+ });
+ }
+ function fnPrint(izPrint) {
+ ElementPlus.ElMessageBox.confirm('纭畾鎵撳嵃鍚�?')
+ .then(() => {
+ print(izPrint,0)
+ })
+ .catch(() => {
+ // catch error
+ })
+
+ }
+
+ function fnPrintView(izPrint){
+ print(izPrint,0)
+ }
+
+ function fnPrintRedView(izPrint) {
+ print(izPrint,1);
+ }
+
+ function fnPrintRed(izPrint) {
+ ElementPlus.ElMessageBox.confirm('纭畾绾㈠瓧鎵撳嵃鍚�?')
+ .then(() => {
+ print(izPrint,1);
+ })
+ .catch(() => {
+ // catch error
+ })
+
+ }
+
+ function print(izPrint,izRed){
const LODOP = getLodop()
const loading = ElementPlus.ElLoading.service({
lock: true,
@@ -347,7 +442,7 @@
page()
}
function handleSelectionChange(val) {
- console.log(val)
+
selectList.value = val
}
@@ -371,7 +466,12 @@
options,
printOptions,
page,
+ fnPrint,
fnPrintView,
+ fnCanelPrint,
+ fnCanelPrintRed,
+ fnPrintRed,
+ fnPrintRedView,
handleSizeChange,
handleCurrentChange,
handleSelectionChange
--
Gitblit v1.9.1