From 2228f5b934eda1a3bf4ea53965662e05c27b6fbd Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 31 十月 2025 12:39:28 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/erpTongbu/tongbu.html |  435 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 435 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/views/erpTongbu/tongbu.html b/src/main/webapp/views/erpTongbu/tongbu.html
new file mode 100644
index 0000000..157e716
--- /dev/null
+++ b/src/main/webapp/views/erpTongbu/tongbu.html
@@ -0,0 +1,435 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <title></title>
+    <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">
+    <style>
+        .text-center {
+            text-align: center;
+        }
+        .text-gray-500 {
+            width: 100%;
+            color: #6b7280;
+        }
+    </style>
+</head>
+
+<body>
+<div id="app">
+    <el-card>
+        <el-form :inline="true" label-width="auto">
+            <el-form-item label="">
+                <el-button type="primary" @click="page" circle >
+                    <el-icon><Search /></el-icon>
+                </el-button>
+            </el-form-item>
+            <el-form-item label="">
+                <el-button type="primary"  @click="tongbu">鍚屾</el-button>
+            </el-form-item>
+        </el-form>
+        <el-table
+                :data="tableData"
+                border
+                style="width: 100%"
+                row-key="id"
+                @selection-change="handleSelectionChange"
+                max-height="650"
+                highlight-current-row
+                @cell-dblclick="handleCurrentChange"
+        >
+            <el-table-column type="selection" >
+            </el-table-column>
+            <el-table-column type="index" width="50" >
+            </el-table-column>
+            <el-table-column prop="tongbuType" label="鍚屾绫诲瀷" >
+            </el-table-column>
+
+        </el-table>
+
+        <el-dialog v-model="dialogVisible" fullscreen>
+            <el-form :inline="true" label-width="auto">
+
+                <el-form-item label="">
+                    <el-button type="primary"  @click="tongbuDialog">鍚屾</el-button>
+                </el-form-item>
+            </el-form>
+            <el-table :data="tableDataDialog" border style="width: 100%" @selection-change="handleSelectionChangeDialog" max-height="650">
+                <el-table-column type="selection" >
+                </el-table-column>
+                <el-table-column type="index" width="50" >
+                </el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="fdate" label="鍗曟嵁鏃ユ湡" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="fbillno" label="鍗曟嵁鍙�" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="venname" label="渚涘簲鍟�" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="biztype" label="涓氬姟绫诲瀷" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="fcommitqty" label="鏁伴噺" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="fnumber" label="鐗╂枡缂栫爜" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="fname" label="鐗╂枡鍚嶇О" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="fmodel" label="瑙勬牸鍨嬪彿" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="forderbillno" label="璁㈠崟缂栧彿" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '0'" prop="jhdate" label="浜よ揣鏃ユ湡" ></el-table-column>
+
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fbillno" label="鍗曟嵁鍙�" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fnumber" label="鐗╂枡缂栫爜" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fname" label="鐗╂枡鍚嶇О" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fmodel" label="瑙勬牸鍨嬪彿" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fcommitqty" label="鏁伴噺" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fplancommitdate" label="璁″垝寮�宸ユ棩鏈�" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fplanfinishdate" label="璁″垝瀹屾垚鏃ユ湡" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '1' || dblSelect.id === '2'" prop="fsourcebillno" label="鐢熶骇鍗曞彿" ></el-table-column>
+
+                <el-table-column v-if="dblSelect.id === '3'" prop="fbillno" label="鍗曟嵁鍙�" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fdate" label="鍗曟嵁鏃ユ湡" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="cusname" label="瀹㈡埛" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fnumber" label="鐗╂枡缂栫爜" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fname" label="鐗╂枡鍚嶇О" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fmodel" label="瑙勬牸鍨嬪彿" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fcommitqty" label="鏁伴噺" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fbarcode" label="鏉″舰鐮�" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="ffetchdate" label="浜よ揣鏃ユ湡" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '3'" prop="fnote" label="澶囨敞" ></el-table-column>
+
+
+                <el-table-column v-if="dblSelect.id === '4'" prop="fnumber" label="鐗╂枡缂栫爜" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '4'" prop="checkqty" label="鏁伴噺" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '4'" prop="createtime" label="鍒涘缓鏃堕棿" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '4'" prop="vouchtype" label="鍗曟嵁绫诲瀷" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '4'" prop="fname" label="鐗╂枡鍚嶇О" ></el-table-column>
+                <el-table-column v-if="dblSelect.id === '4'" prop="fmodel" label="瑙勬牸鍨嬪彿" ></el-table-column>
+
+                
+            </el-table>
+            <template #footer>
+                <div class="dialog-footer">
+                    <el-button @click="dialogVisible = false">鍏抽棴</el-button>
+                </div>
+            </template>
+        </el-dialog>
+    </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='../../static/js/erp/LodopFuncs.js'></script>
+<script type="module">
+    // 瀵煎叆涓枃璇█鍖�
+    import zhCn from '../../static/js/erp/zh-cn.js';
+
+    const { createApp, ref, onMounted, onBeforeMount ,watchEffect} = Vue;
+
+
+    const app = createApp({
+        setup() {
+            const currentPage = ref(1)
+            const pageSizes = ref([15,20, 30, 50, 100, 200])
+            const pageSize = ref(15)
+            const pageTotal = ref(0)
+            const tableSearchParam = ref({
+                izJb:"鍚�",
+                dateStart:new Date(),
+                dateEnd: new Date(),
+                venId:null,
+                izJs:"鍚�"
+            })
+            const tableSearchParamDialog = ref({
+                dateStart:new Date(),
+                dateEnd: new Date(),
+                izSync: null
+            })
+            const tableData = ref([])
+            const tableDataDialog = ref([])
+            const defaultTime = ref(new Date())
+            const fullscreenLoading = ref(false)
+
+            const selectData = ref([
+            ])
+
+            const dialogVisible = ref(false)
+
+            const selectList = ref([])
+
+            const selectListDialog = ref([])
+
+            const dblSelect = ref()
+
+            function page(){
+                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/tongbu/getList",
+                    dataType: 'json',
+                    contentType: 'application/json;charset=UTF-8',
+                    method: 'GET',
+                    success: function(res) {
+                        loading.close()
+                        if (res.code == 200) {
+                            tableData.value = res.data
+                            ElementPlus.ElMessage({
+                                message: "鎷夊彇鏁版嵁瀹屾垚",
+                                type: 'success'
+                            });
+                        } else if (res.code === 403) {
+                            top.location.href = baseUrl + "/";
+                        } else {
+                            ElementPlus.ElMessage({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }
+                });
+            }
+
+            function dialogPage(){
+                let method = '';
+                let izSrcVouch = '';
+
+                switch (dblSelect.value.id) {
+                    case "0":
+                        method = 'getpulist'
+                        break;
+                    case "1":
+                        method = 'getfinishedlist'
+                        izSrcVouch = '1'
+                        break;
+                    case "2":
+                        method = 'getfinishedlist'
+                        izSrcVouch = '0'
+                        break;
+                    case "3":
+                        method = 'getsalelist'
+                        break;
+                    case "4":
+                        method = 'getchecklist'
+                        break;
+                }
+                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/tongbu/"+method,
+                    data: {
+                        izSrcVouch:izSrcVouch
+                    },
+                    contentType: 'application/json;charset=UTF-8',
+                    method: 'GET',
+                    success: function(res) {
+                        loading.close()
+                        if (res.code == 200) {
+                            tableDataDialog.value = res.data
+                            ElementPlus.ElMessage({
+                                message: "鎷夊彇鏁版嵁瀹屾垚",
+                                type: 'success'
+                            });
+                        } else if (res.code === 403) {
+                            top.location.href = baseUrl + "/";
+                        } else {
+                            ElementPlus.ElMessage({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }
+                });
+            }
+
+            function tongbu(){
+                ElementPlus.ElMessageBox.confirm('纭畾鍚屾鍚�?')
+                    .then(() => {
+                        fnTongBu()
+                    })
+                    .catch(() => {
+                        // catch error
+                    })
+            }
+
+            function fnTongBu(){
+                if (selectList.value.length === 0){
+                    ElementPlus.ElMessage({
+                        message: "璇峰厛閫夋嫨",
+                        type: 'error'
+                    });
+                    return ;
+                }
+                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/tongbu/tongbu",
+                    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 tongbuDialog(){
+                ElementPlus.ElMessageBox.confirm('纭畾鍚屾鍚�?')
+                    .then(() => {
+                        fnDialogTongBu()
+                    })
+                    .catch(() => {
+                        // catch error
+                    })
+            }
+            function fnDialogTongBu(){
+                if (selectListDialog.value.length === 0){
+                    ElementPlus.ElMessage({
+                        message: "璇峰厛閫夋嫨",
+                        type: 'error'
+                    });
+                    return ;
+                }
+                let method = '';
+                let izSrcVouch = '';
+                switch (dblSelect.value.id) {
+                    case "0":
+                        method = 'savepu'
+                        break;
+                    case "1":
+                        method = 'savefinished'
+                        izSrcVouch = '1'
+                        break;
+                    case "2":
+                        method = 'savefinished'
+                        izSrcVouch = '0'
+                        break;
+                    case "3":
+                        method = 'savesale'
+                        break;
+                    case "4":
+                        method = 'savecheck'
+                        break;
+                }
+                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/tongbu/"+method,
+                    data: JSON.stringify({
+                        list : JSON.stringify(selectListDialog.value),
+                        izSrcVouch : izSrcVouch
+                    }),
+                    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'
+                            });
+                        }
+                    },
+                    complete: function() {
+                        dialogPage();
+                    }
+                });          
+
+            }
+            function handleSizeChange(val) {
+                pageSize.value = val
+                currentPage.value = 1 // 閲嶇疆鍒扮涓�椤�
+                page()
+            }
+
+            function handleCurrentChange(val) {
+                dblSelect.value = val
+                tableDataDialog.value = []
+                dialogPage()
+                dialogVisible.value = true
+            }
+            function handleSelectionChange(val) {
+                selectList.value = val
+                console.log(selectList.value)
+            }
+            function handleSelectionChangeDialog(val) {
+                selectListDialog.value = val
+            }
+
+            onMounted(() => {
+                page()
+            })
+
+            return {
+                tableData,
+                tableDataDialog,
+                currentPage,
+                pageSizes,
+                pageSize,
+                pageTotal,
+                tableSearchParam,
+                tableSearchParamDialog,
+                defaultTime,
+                selectData,
+                dialogVisible,
+                dblSelect,
+                page,
+                dialogPage,
+                tongbu,
+                tongbuDialog,
+                handleSizeChange,
+                handleCurrentChange,
+                handleSelectionChange,
+                handleSelectionChangeDialog
+
+            }
+        }
+    });
+
+    app.use(ElementPlus, {
+        locale: zhCn.default || zhCn
+    });
+    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
+        app.component(key, component)
+    }
+    app.mount('#app');
+</script>
+
+</body>
+
+</html>
\ No newline at end of file

--
Gitblit v1.9.1