|
@@ -1,1307 +1,934 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div>
|
|
|
|
|
- <!-- 左侧树侧形结构-->
|
|
|
|
|
- <el-container>
|
|
|
|
|
- <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;">
|
|
|
|
|
- <div class="JKWTree-tree" style="height: 70vh;">
|
|
|
|
|
- <h3>包装计件单据维护</h3>
|
|
|
|
|
- <el-tree :data="treeData" highlight-current @node-click="handleNodeClick" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </layout-sider>
|
|
|
|
|
- <el-container>
|
|
|
|
|
- <el-main>
|
|
|
|
|
- <!-- 按钮 -->
|
|
|
|
|
- <div class="gva-table-box">
|
|
|
|
|
- <el-form>
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-input v-model="searchInfo" placeholder="搜索产品编号或产品名称" clearable style="width: 180px;" />
|
|
|
|
|
- <el-button type="primary" icon="Search" class="search" @click="handleSearch" />
|
|
|
|
|
- <el-button type="primary" icon="edit" class="bt" @click="handleShowDetail">查改</el-button>
|
|
|
|
|
- <el-button type="primary" icon="edit" class="bt" @click="handleShowAdd">新增</el-button>
|
|
|
|
|
- <el-button type="primary" icon="delete" class="bt" @click="handleDelete">删除</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <!-- 数据展示 -->
|
|
|
|
|
- <el-table ref="table" style="width: 100%" :data="tableData" row-key="ID" highlight-current-row
|
|
|
|
|
- border show-overflow-tooltip :row-style="{ height: '20px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }" @row-dblclick="handleShowDetail"
|
|
|
|
|
- @current-change="(row, oldRow) => { currentRow = row}">
|
|
|
|
|
- <el-table-column type="selection" width="55" />
|
|
|
|
|
- <!-- 循环渲染列 -->
|
|
|
|
|
- <el-table-column v-for=" column in tableColumns " :key="column.prop" :prop="column.prop"
|
|
|
|
|
- :label="column.label" width="110" sortable />
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <!-- 分页 -->
|
|
|
|
|
- <div class="gva-pagination">
|
|
|
|
|
- <el-pagination v-model:current-page="page" v-model:page-size="limit"
|
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 30, 50, 100]"
|
|
|
|
|
- :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px"
|
|
|
|
|
- @keydown="selectBZ($event)">
|
|
|
|
|
- <el-table tooltip-effect="dark" :data="selectDataBz" row-key="ID"
|
|
|
|
|
- highlight-current-row="true" border style="width:100%" @row-dblclick="SelectClickBz"
|
|
|
|
|
- ref="table">
|
|
|
|
|
- <el-table-column prop="sczl_bzdh" label="班组" width="150" />
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <el-dialog v-model="BzVisible2" title="冲月定额" destroy-on-close width="200px"
|
|
|
|
|
- @keydown="selectCY($event)">
|
|
|
|
|
- <el-table tooltip-effect="dark" :data="selectDataCY" row-key="ID"
|
|
|
|
|
- highlight-current-row="true" border style="width:100%" @row-dblclick="SelectClickCY"
|
|
|
|
|
- ref="table" :row-style="{ height: '30px' }" >
|
|
|
|
|
- <el-table-column prop="sczl_冲定额" label="冲月定额" width="150" />
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!-- 弹出框 -->
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-dialog v-model="dialogFormVisible" :title="type" destroy-on-close width="1400px">
|
|
|
|
|
- <el-form id="detail-form" :model="detailData" inline label-position="left"
|
|
|
|
|
- @keyup="moveFocus">
|
|
|
|
|
- <el-form-item label="日期">
|
|
|
|
|
- <el-input type="date" max="9999-12-31" @focus="rqHandleFocus()"
|
|
|
|
|
- v-model="detailData.sczl_rq" style="width: 120px;" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-form-item label="员工编号">
|
|
|
|
|
- <el-input v-model="detailData.sczl_bh" style="width: 100px;"
|
|
|
|
|
- placeholder="Enter回车"
|
|
|
|
|
- />
|
|
|
|
|
- <el-input v-model="detailData.name" style="width: 100px; padding-left: 5px;"
|
|
|
|
|
- @click="selectvalue($event)" readonly />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-form-item label="组别">
|
|
|
|
|
- <!-- <el-select v-model="detailData.sczl_bzdh" placeholder=" " style="width: 80px" >
|
|
|
|
|
- <el-option label="A班" value="A班" />
|
|
|
|
|
- <el-option label="B班" value="B班" />
|
|
|
|
|
- </el-select> -->
|
|
|
|
|
- <el-input v-model="detailData.sczl_bzdh" style="width: 80px;" @keydown="getBzsubmit($event)" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <br>
|
|
|
|
|
-
|
|
|
|
|
- <el-form-item label="计时时数" style="padding-left: 195px;">
|
|
|
|
|
- <el-input v-model="detailData.sczl_jsss" style="width: 100px;"
|
|
|
|
|
- @click="selectvalue($event)" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-form-item label="冲月定额">
|
|
|
|
|
- <!-- <el-select v-model="detailData.sczl_冲定额" placeholder=" " style="width: 100px">
|
|
|
|
|
- <el-option label="" value="" />
|
|
|
|
|
- <el-option label="是" value="是" />
|
|
|
|
|
- </el-select> -->
|
|
|
|
|
- <el-input v-model="detailData.sczl_冲定额" style="width: 80px;" @keydown="getBzsubmit2($event)" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-table :data="detailData.table" border tooltip-effect="dark"
|
|
|
|
|
- :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
|
|
|
|
|
- :header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }">
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="工单编号" width="120">
|
|
|
|
|
- <template #default="{ row, $index }">
|
|
|
|
|
- <el-input v-model="row.sczl_gdbh" placeholder="Enter回车"
|
|
|
|
|
- @keyup.enter="handleEnter($index, row)" @keyup ="movefous($event,row)" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="印件工序" width="100">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_yjGx" readonly />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="工序名称" width="100">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_gxmc" readonly />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="印件名称" width="310">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.Gd_cpmc" readonly />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="核算标准">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-select v-model="row.hsbz" placeholder="请选择">
|
|
|
|
|
- <el-option label="1000" value="1000"></el-option>
|
|
|
|
|
- <el-option label="2500" value="2500"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="包装产量" width="100">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_cl" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="返工产量" width="95">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_返工产量" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="每箱数量" width="100">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_PgCl" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="计产系数" width="95">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_计产系数" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="来源" width="95">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-input v-model="row.sczl_Jtbh1"
|
|
|
|
|
- @keyup ="movefous2($event,row)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="定额代号" width="130">
|
|
|
|
|
- <template #default="{ row, $index }">
|
|
|
|
|
- <el-input id="input" v-model="row.sczl_dedh"
|
|
|
|
|
- @keyup.enter="getDedhsubmit($index, row)" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- </el-table>
|
|
|
|
|
-
|
|
|
|
|
- <el-form-item label="其他备注" style="margin-top: 10px;">
|
|
|
|
|
- <el-input v-model="detailData.sczl_desc" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- </el-form>
|
|
|
|
|
-
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div class="dialog-footer">
|
|
|
|
|
- <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="enterDialog">确 定
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- 新增定额代号 -->
|
|
|
|
|
- <el-dialog v-model="dedhsearchModel" :before-close="() => dedhsearchModel = false" @opened="focusFirstNode">
|
|
|
|
|
- <el-form>
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-form-item label="定额代号 :" class="mab" prop="keyOrder">
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- <div style="border:1px solid #eee; width:100%; height: 400px; overflow-y: auto">
|
|
|
|
|
- <el-tree ref="table_dedh" node-key="id" :data="dedhtreeData" :props="{
|
|
|
|
|
- children: 'children',
|
|
|
|
|
- label: 'label',
|
|
|
|
|
- }" @node-click="dedhhandleNodeClick"></el-tree>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- 弹出选项框 -->
|
|
|
|
|
- <el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="800px"
|
|
|
|
|
- @keydown="selectCP($event)">
|
|
|
|
|
- <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row border
|
|
|
|
|
- style="width:100%" @row-dblclick="handleSelectClick" ref="table2">
|
|
|
|
|
- <el-table-column prop="Gd_cpmc" label="产品名称" width="460" />
|
|
|
|
|
- <el-table-column prop="Gy0_gxmc" label="工序" width="200" />
|
|
|
|
|
- <el-table-column prop="jyGx" label="工序编号" width="100" />
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 员工选择 -->
|
|
|
|
|
- <el-dialog v-model="dialogSelectVisible_Yg" title="选择" destroy-on-close width="300px"
|
|
|
|
|
- @keydown="selectGX_Yg($event)">
|
|
|
|
|
- <el-table tooltip-effect="dark" :data="selectData_Yg" row-key="ID" highlight-current-row="true"
|
|
|
|
|
- border style="width:100%" @row-dblclick="handleSelectClick_Yg" ref="table_Yg">
|
|
|
|
|
- <el-table-column prop="员工编号" label="员工编号" width="100" />
|
|
|
|
|
- <el-table-column prop="ygxm" label="员工姓名" width="200" />
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 班组选择 -->
|
|
|
|
|
- <el-dialog v-model="dialogSelectVisible_Bz" title="选择" destroy-on-close width="200px"
|
|
|
|
|
- @keydown="selectGX_Bz($event)">
|
|
|
|
|
- <el-table tooltip-effect="dark" :data="selectData_Bz" row-key="ID" highlight-current-row="true"
|
|
|
|
|
- border style="width:100%" @row-dblclick="handleSelectClick_Bz" ref="table_Bz">
|
|
|
|
|
- <el-table-column prop="sczl_bzdh" label="班组" width="160" />
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
- </el-main>
|
|
|
|
|
- </el-container>
|
|
|
|
|
- </el-container>
|
|
|
|
|
- </div>
|
|
|
|
|
-</template>
|
|
|
|
|
-
|
|
|
|
|
-<script>
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-<script setup>
|
|
|
|
|
- import {
|
|
|
|
|
- Layout,
|
|
|
|
|
- LayoutContent,
|
|
|
|
|
- LayoutHeader,
|
|
|
|
|
- LayoutSider
|
|
|
|
|
- } from '@arco-design/web-vue'
|
|
|
|
|
- import {
|
|
|
|
|
- ElMessage,
|
|
|
|
|
- ElMessageBox,
|
|
|
|
|
- dayjs
|
|
|
|
|
- } from 'element-plus'
|
|
|
|
|
-
|
|
|
|
|
- // import { Download, Search, Delete } from '@element-plus/icons-vue'
|
|
|
|
|
- import {
|
|
|
|
|
- reactive,
|
|
|
|
|
- ref,
|
|
|
|
|
- nextTick,
|
|
|
|
|
- onMounted
|
|
|
|
|
- } from 'vue'
|
|
|
|
|
- import {
|
|
|
|
|
- getGxMc,
|
|
|
|
|
- getInfo,
|
|
|
|
|
- getLocate,
|
|
|
|
|
- getPackingSideTable,
|
|
|
|
|
- getPackingTable,
|
|
|
|
|
- updatePackingTable,
|
|
|
|
|
- getYg,
|
|
|
|
|
- DeletePackingTable,
|
|
|
|
|
- addPackingTable,
|
|
|
|
|
- getDedh
|
|
|
|
|
- } from '@/api/mes_api_gty/myapi'
|
|
|
|
|
- import {
|
|
|
|
|
- useUserStore
|
|
|
|
|
- } from '@/pinia/modules/user'
|
|
|
|
|
- const userStore = useUserStore()
|
|
|
|
|
- const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
|
|
|
|
|
- defineOptions({
|
|
|
|
|
- name: '06PackingDocuments',
|
|
|
|
|
- })
|
|
|
|
|
- //班组
|
|
|
|
|
- const BzVisible = ref (false)
|
|
|
|
|
- //
|
|
|
|
|
- const BzVisible2 = ref (false)
|
|
|
|
|
- const selectDataBz = reactive([])
|
|
|
|
|
- const selectDataCY = reactive([])
|
|
|
|
|
-const SelectClickBz = (row, column, event) => {
|
|
|
|
|
- detailData.sczl_bzdh = row.sczl_bzdh
|
|
|
|
|
- BzVisible.value = false
|
|
|
|
|
- }
|
|
|
|
|
- const selectBZ = (event) => {
|
|
|
|
|
- if (event.keyCode === 40) { // Enter 或向下箭头
|
|
|
|
|
- setCurrent(selectDataBz[1]);
|
|
|
|
|
-
|
|
|
|
|
- } else if (event.keyCode === 38) {
|
|
|
|
|
- setCurrent(selectDataBz[0]);
|
|
|
|
|
-
|
|
|
|
|
- } else if (event.keyCode === 13) {
|
|
|
|
|
- BzVisible.value = false
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- const selectCY = (event) => {
|
|
|
|
|
- if (event.keyCode === 40) { // Enter 或向下箭头
|
|
|
|
|
- setCurrent2(selectDataCY[1]);
|
|
|
|
|
-
|
|
|
|
|
- } else if (event.keyCode === 38) {
|
|
|
|
|
- setCurrent2(selectDataCY[0]);
|
|
|
|
|
-
|
|
|
|
|
- } else if (event.keyCode === 13) {
|
|
|
|
|
- BzVisible2.value = false
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- const SelectClickCY = (row, column, event) => {
|
|
|
|
|
- detailData.sczl_冲定额 = row.sczl_冲定额
|
|
|
|
|
- BzVisible2.value = false
|
|
|
|
|
- }
|
|
|
|
|
- // 侧边栏功能
|
|
|
|
|
- const treeData = reactive([])
|
|
|
|
|
- const getSideData = async () => {
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await getPackingSideTable()
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- const transformedData = response.data.map(item => ({
|
|
|
|
|
- label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
|
|
|
|
|
- children: item.sys.map(sysItem => ({
|
|
|
|
|
- label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
|
|
|
|
|
- params: {
|
|
|
|
|
- date: item.date.replace(/\./g, '-'),
|
|
|
|
|
- sys_id: sysItem.sys_id,
|
|
|
|
|
- },
|
|
|
|
|
- })),
|
|
|
|
|
- }))
|
|
|
|
|
- treeData.splice(0, treeData.length, ...transformedData)
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- getSideData()
|
|
|
|
|
-
|
|
|
|
|
- // 表格功能
|
|
|
|
|
- const tableColumns = [{
|
|
|
|
|
- label: '员工编号',
|
|
|
|
|
- prop: 'sczl_bh',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '员工姓名',
|
|
|
|
|
- prop: 'name',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '生产日期',
|
|
|
|
|
- prop: 'sczl_rq',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '班组',
|
|
|
|
|
- prop: 'sczl_bzdh',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '包装产量',
|
|
|
|
|
- prop: 'sczl_cl',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '返工产量',
|
|
|
|
|
- prop: 'sczl_fgsl',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '计件产量',
|
|
|
|
|
- prop: 'sczl_jjcl',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '相关工单',
|
|
|
|
|
- prop: 'sczl_gdbh1',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '创建用户',
|
|
|
|
|
- prop: 'sys_id',
|
|
|
|
|
- width: '120'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '创建时间',
|
|
|
|
|
- prop: 'sys_rq',
|
|
|
|
|
- width: '180'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '修改时间',
|
|
|
|
|
- prop: 'mod_rq',
|
|
|
|
|
- width: '180'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: 'UNIQID',
|
|
|
|
|
- prop: 'UniqId',
|
|
|
|
|
- width: '100'
|
|
|
|
|
- },
|
|
|
|
|
- ]
|
|
|
|
|
- const tableData = reactive([])
|
|
|
|
|
- const params = {
|
|
|
|
|
- type: '',
|
|
|
|
|
- date: '',
|
|
|
|
|
- sys_id: '',
|
|
|
|
|
- gdbh: '',
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const total = ref(0)
|
|
|
|
|
- const page = ref(1)
|
|
|
|
|
- const limit = ref(10)
|
|
|
|
|
-
|
|
|
|
|
- const type = ref('')
|
|
|
|
|
- const searchInfo = ref('')
|
|
|
|
|
- const currentRow = ref({})
|
|
|
|
|
- // const multipleSelection = ref([])
|
|
|
|
|
-
|
|
|
|
|
- // 获取列表数据
|
|
|
|
|
- const getTableData = async () => {
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await getPackingTable({
|
|
|
|
|
- date: params.date,
|
|
|
|
|
- sys_id: params.sys_id,
|
|
|
|
|
- page: page.value.toString(),
|
|
|
|
|
- limit: limit.value.toString(),
|
|
|
|
|
- })
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- total.value = response.data.total
|
|
|
|
|
- tableData.splice(0, tableData.length, ...response.data.rows)
|
|
|
|
|
- setCurrent(tableData[0])
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- // 获取定位数据
|
|
|
|
|
- const getLocateTable = async () => {
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await getLocate({
|
|
|
|
|
- gdbh: params.gdbh,
|
|
|
|
|
- page: page.value.toString(),
|
|
|
|
|
- limit: limit.value.toString(),
|
|
|
|
|
- })
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- total.value = response.data.total
|
|
|
|
|
- tableData.splice(0, tableData.length, ...response.data.rows)
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- // 删除数据
|
|
|
|
|
- const deleteTableData = async (id) => {
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await DeletePackingTable({
|
|
|
|
|
- UniqId: id
|
|
|
|
|
- })
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- return 0
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const handleNodeClick = (node, check) => {
|
|
|
|
|
- if (node.params) {
|
|
|
|
|
- params.date = node.params.date
|
|
|
|
|
- params.sys_id = node.params.sys_id
|
|
|
|
|
- params.type = 'getTableData'
|
|
|
|
|
- page.value = 1
|
|
|
|
|
- getTableData()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const selectvalue = (e) => {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- e.currentTarget.select();
|
|
|
|
|
- }
|
|
|
|
|
- // 定位
|
|
|
|
|
- const handleSearch = () => {
|
|
|
|
|
- params.gdbh = searchInfo.value
|
|
|
|
|
- params.type = 'getLocateTable'
|
|
|
|
|
- page.value = 1
|
|
|
|
|
- getLocateTable()
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 查改
|
|
|
|
|
- const handleShowDetail = () => {
|
|
|
|
|
- type.value = '查改'
|
|
|
|
|
- console.log(currentRow.value)
|
|
|
|
|
- if (currentRow.value.UniqId == undefined) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '未选中记录',
|
|
|
|
|
- })
|
|
|
|
|
- return
|
|
|
|
|
- } else {
|
|
|
|
|
- getTableInfo(currentRow.value?.UniqId)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 删除
|
|
|
|
|
- const handleDelete = () => {
|
|
|
|
|
- if (currentRow.value.UniqId == undefined) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '未选中记录',
|
|
|
|
|
- })
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- ElMessageBox.confirm(
|
|
|
|
|
- `确认删除这条数据么?`,
|
|
|
|
|
- '警告', {
|
|
|
|
|
- confirmButtonText: '确认',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- }
|
|
|
|
|
- )
|
|
|
|
|
- .then(async () => {
|
|
|
|
|
- const ret = await deleteTableData(currentRow.value?.UniqId)
|
|
|
|
|
- if (ret === 0) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: '删除成功',
|
|
|
|
|
- })
|
|
|
|
|
- getSideData()
|
|
|
|
|
- getTableData()
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'error',
|
|
|
|
|
- message: '删除失败',
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'info',
|
|
|
|
|
- message: '取消删除',
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- // 分页
|
|
|
|
|
- // #region
|
|
|
|
|
- const handleSizeChange = () => {
|
|
|
|
|
- switch (params.type) {
|
|
|
|
|
- case 'getTableData':
|
|
|
|
|
- getTableData()
|
|
|
|
|
- break
|
|
|
|
|
- case 'getLocateTable':
|
|
|
|
|
- getLocateTable()
|
|
|
|
|
- break
|
|
|
|
|
- default:
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const handleCurrentChange = () => {
|
|
|
|
|
- switch (params.type) {
|
|
|
|
|
- case 'getTableData':
|
|
|
|
|
- getTableData()
|
|
|
|
|
- break
|
|
|
|
|
- case 'getLocateTable':
|
|
|
|
|
- getLocateTable()
|
|
|
|
|
- break
|
|
|
|
|
- default:
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- // #endregion
|
|
|
|
|
-
|
|
|
|
|
- // 详情界面
|
|
|
|
|
- const detailData = reactive({
|
|
|
|
|
- UniqId: '',
|
|
|
|
|
- selectIndex: 0,
|
|
|
|
|
- sczl_rq: '',
|
|
|
|
|
- sczl_bh: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
- sczl_bzdh: '',
|
|
|
|
|
- sczl_jsss: '',
|
|
|
|
|
- sczl_冲定额: '',
|
|
|
|
|
- sczl_desc: '',
|
|
|
|
|
- table: [],
|
|
|
|
|
- })
|
|
|
|
|
- const selectData = reactive([])
|
|
|
|
|
- const table = ref()
|
|
|
|
|
-
|
|
|
|
|
- // 弹窗控制标记
|
|
|
|
|
- const dialogFormVisible = ref(false)
|
|
|
|
|
- const dialogSelectVisible = ref(false)
|
|
|
|
|
-
|
|
|
|
|
- const setCurrent = (row) => {
|
|
|
|
|
- table.value?.setCurrentRow(row)
|
|
|
|
|
- detailData.sczl_bzdh = row.sczl_bzdh
|
|
|
|
|
- detailData.sczl_冲定额 = row.sczl_冲定额
|
|
|
|
|
- }
|
|
|
|
|
- const setCurrent2 = (row) => {
|
|
|
|
|
- table.value?.setCurrentRow(row)
|
|
|
|
|
- detailData.sczl_冲定额 = row.sczl_冲定额
|
|
|
|
|
- }
|
|
|
|
|
- // 获取详细信息
|
|
|
|
|
- const getTableInfo = async (id) => {
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await getInfo({
|
|
|
|
|
- UniqId: id
|
|
|
|
|
- })
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- const {
|
|
|
|
|
- sczl_rq,
|
|
|
|
|
- sczl_bh,
|
|
|
|
|
- name,
|
|
|
|
|
- sczl_bzdh,
|
|
|
|
|
- sczl_jsss,
|
|
|
|
|
- sczl_冲定额,
|
|
|
|
|
- sczl_desc,
|
|
|
|
|
- ...rest
|
|
|
|
|
- } = response.data
|
|
|
|
|
- Object.assign(detailData, {
|
|
|
|
|
- sczl_rq,
|
|
|
|
|
- sczl_bh,
|
|
|
|
|
- name,
|
|
|
|
|
- sczl_bzdh,
|
|
|
|
|
- sczl_jsss,
|
|
|
|
|
- sczl_冲定额,
|
|
|
|
|
- sczl_desc
|
|
|
|
|
- })
|
|
|
|
|
- detailData.table = Array.from({
|
|
|
|
|
- length: 6
|
|
|
|
|
- }, (_, i) => i + 1)
|
|
|
|
|
- .map(num => {
|
|
|
|
|
- return {
|
|
|
|
|
- sczl_gdbh: rest[`sczl_gdbh${num}`],
|
|
|
|
|
- sczl_yjGx: rest[`sczl_yjGx${num}`],
|
|
|
|
|
- sczl_gxmc: rest[`sczl_gxmc${num}`],
|
|
|
|
|
- Gd_cpmc: rest[`Gd_cpmc${num}`],
|
|
|
|
|
- sczl_cl: rest[`sczl_cl${num}`],
|
|
|
|
|
- hsbz:rest[`sczl_type${num}`],
|
|
|
|
|
- sczl_返工产量: rest[`sczl_返工产量${num}`],
|
|
|
|
|
- sczl_PgCl: rest[`sczl_PgCl${num}`],
|
|
|
|
|
- sczl_计产系数: rest[`sczl_计产系数${num}`],
|
|
|
|
|
- sczl_Jtbh1: rest[`sczl_Jtbh${num}`],
|
|
|
|
|
- sczl_dedh: rest[`sczl_dedh${num}`],
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- if (type.value === '新增') {
|
|
|
|
|
- console.log(detailData)
|
|
|
|
|
- // detailData.name = ''
|
|
|
|
|
- // detailData.sczl_bh = ''
|
|
|
|
|
- // detailData.sczl_bzdh = ''
|
|
|
|
|
- // detailData.sczl_desc = ''
|
|
|
|
|
- // detailData.sczl_jsss = ''
|
|
|
|
|
- // detailData.sczl_rq = ''
|
|
|
|
|
- detailData.table.forEach(row => {
|
|
|
|
|
- for (const key in row) {
|
|
|
|
|
- if ( key === 'sczl_cl'){
|
|
|
|
|
- row[key] = '' // 清空每行的内容
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- detailData.UniqId = id
|
|
|
|
|
- dialogFormVisible.value = true
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (type.value === '新增' || type.value === '查改') {
|
|
|
|
|
- detailData.UniqId = id
|
|
|
|
|
- dialogFormVisible.value = true
|
|
|
|
|
-
|
|
|
|
|
- // 在 setTimeout 中获取元素,确保在 DOM 渲染完毕后执行
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- formElements = document.getElementById('detail-form').elements
|
|
|
|
|
- formElements[0].focus()
|
|
|
|
|
- }, 0)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //日期获得焦点事件
|
|
|
|
|
- const rqHandleFocus = () => {
|
|
|
|
|
- if (detailData.sczl_rq == '') {
|
|
|
|
|
- detailData.sczl_rq = new Date().toISOString().split('T')[0]
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 获取工序名称
|
|
|
|
|
- const getTableGxMc = async (index, row) => {
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await getGxMc({
|
|
|
|
|
- gdbh: row.sczl_gdbh
|
|
|
|
|
- })
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- const {
|
|
|
|
|
- Gd_cpmc,
|
|
|
|
|
- Gy0_gxmc,
|
|
|
|
|
- jyGx
|
|
|
|
|
- } = response.data[0]
|
|
|
|
|
- if (response.data.length === 1) {
|
|
|
|
|
- detailData.table[index].Gd_cpmc = Gd_cpmc
|
|
|
|
|
- detailData.table[index].sczl_yjGx = jyGx
|
|
|
|
|
- detailData.table[index].sczl_gxmc = Gy0_gxmc
|
|
|
|
|
- } else {
|
|
|
|
|
- selectData.splice(0, selectData.length, ...response.data)
|
|
|
|
|
- setCPCurrent(selectData[0])
|
|
|
|
|
- detailData.selectIndex = index
|
|
|
|
|
- dialogSelectVisible.value = true
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 更新数据
|
|
|
|
|
- const updateDetailData = async () => {
|
|
|
|
|
- const restoredData = {
|
|
|
|
|
- UniqId: detailData.UniqId,
|
|
|
|
|
- sczl_rq: detailData.sczl_rq,
|
|
|
|
|
- sczl_bh: detailData.sczl_bh,
|
|
|
|
|
- name: detailData.name,
|
|
|
|
|
- sczl_bzdh: detailData.sczl_bzdh,
|
|
|
|
|
- sczl_jsss: detailData.sczl_jsss,
|
|
|
|
|
- sczl_冲定额: detailData.sczl_冲定额,
|
|
|
|
|
- sczl_desc: detailData.sczl_desc,
|
|
|
|
|
- }
|
|
|
|
|
- detailData.table.forEach((item, index, array) => {
|
|
|
|
|
- const num = index + 1
|
|
|
|
|
- restoredData[`sczl_gdbh${num}`] = item.sczl_gdbh
|
|
|
|
|
- restoredData[`sczl_yjGx${num}`] = item.sczl_yjGx
|
|
|
|
|
- restoredData[`sczl_gxmc${num}`] = item.sczl_gxmc
|
|
|
|
|
- restoredData[`sczl_type${num}`] = item.hsbz === undefined ? '' : item.hsbz;
|
|
|
|
|
- restoredData[`Gd_cpmc${num}`] = item.Gd_cpmc
|
|
|
|
|
- restoredData[`sczl_cl${num}`] = item.sczl_cl
|
|
|
|
|
- restoredData[`sczl_返工产量${num}`] = item.sczl_返工产量
|
|
|
|
|
- restoredData[`sczl_PgCl${num}`] = item.sczl_PgCl
|
|
|
|
|
- restoredData[`sczl_计产系数${num}`] = item.sczl_计产系数
|
|
|
|
|
- restoredData[`sczl_Jtbh${num}`] = item.sczl_Jtbh1
|
|
|
|
|
- restoredData[`sczl_dedh${num}`] = item.sczl_dedh
|
|
|
|
|
- })
|
|
|
|
|
- console.log(restoredData)
|
|
|
|
|
- // return false;
|
|
|
|
|
- const res = await updatePackingTable(restoredData)
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: '更新成功',
|
|
|
|
|
- })
|
|
|
|
|
- dialogFormVisible.value = false
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 新增数据
|
|
|
|
|
- const handleShowAdd = async () => {
|
|
|
|
|
- type.value = '新增'
|
|
|
|
|
- if (currentRow.value.UniqId == null) {
|
|
|
|
|
- detailData.table = Array.from({
|
|
|
|
|
- length: 6
|
|
|
|
|
- }, (_, i) => i + 1)
|
|
|
|
|
- .map(num => {
|
|
|
|
|
- return {
|
|
|
|
|
- sczl_gdbh: '',
|
|
|
|
|
- sczl_yjGx: '',
|
|
|
|
|
- sczl_gxmc: '',
|
|
|
|
|
- Gd_cpmc: '',
|
|
|
|
|
- sczl_cl: '',
|
|
|
|
|
- sczl_返工产量: '',
|
|
|
|
|
- sczl_PgCl: '',
|
|
|
|
|
- sczl_计产系数: '',
|
|
|
|
|
- sczl_Jtbh1: '',
|
|
|
|
|
- sczl_dedh: '',
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- formElements = document.getElementById('detail-form').elements
|
|
|
|
|
- formElements[0].focus()
|
|
|
|
|
- }, 0)
|
|
|
|
|
- dialogFormVisible.value = true
|
|
|
|
|
- } else {
|
|
|
|
|
- await getTableInfo(currentRow.value?.UniqId)
|
|
|
|
|
- // 默认日期为前一天的日期
|
|
|
|
|
- const date = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
|
|
|
|
|
- detailData.sczl_rq = date
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const addDetailData = async () => {
|
|
|
|
|
- const restoredData = {
|
|
|
|
|
- sys_id: sys_id,
|
|
|
|
|
- sczl_rq: detailData.sczl_rq,
|
|
|
|
|
- sczl_bh: detailData.sczl_bh,
|
|
|
|
|
- // name: detailData.name,
|
|
|
|
|
- sczl_bzdh: detailData.sczl_bzdh,
|
|
|
|
|
- sczl_jsss: detailData.sczl_jsss,
|
|
|
|
|
- sczl_冲定额: detailData.sczl_冲定额,
|
|
|
|
|
- sczl_desc: detailData.sczl_desc,
|
|
|
|
|
- }
|
|
|
|
|
- detailData.table.forEach((item, index, array) => {
|
|
|
|
|
- const num = index + 1
|
|
|
|
|
- restoredData[`sczl_gdbh${num}`] = item.sczl_gdbh
|
|
|
|
|
- restoredData[`sczl_yjGx${num}`] = item.sczl_yjGx
|
|
|
|
|
- restoredData[`sczl_gxmc${num}`] = item.sczl_gxmc
|
|
|
|
|
- restoredData[`sczl_type${num}`] = item.hsbz === undefined ? '' : item.hsbz;
|
|
|
|
|
- // restoredData[`Gd_cpmc${num}`] = item.Gd_cpmc
|
|
|
|
|
- restoredData[`sczl_cl${num}`] = item.sczl_cl
|
|
|
|
|
- restoredData[`sczl_返工产量${num}`] = item.sczl_返工产量
|
|
|
|
|
- restoredData[`sczl_PgCl${num}`] = item.sczl_PgCl
|
|
|
|
|
- restoredData[`sczl_计产系数${num}`] = item.sczl_计产系数
|
|
|
|
|
- restoredData[`sczl_Jtbh${num}`] = item.sczl_Jtbh1
|
|
|
|
|
- restoredData[`sczl_dedh${num}`] = item.sczl_dedh
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- const res = await addPackingTable(restoredData)
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: '新增成功',
|
|
|
|
|
- })
|
|
|
|
|
- dialogFormVisible.value = false
|
|
|
|
|
- if (params.date != '') {
|
|
|
|
|
- getTableData()
|
|
|
|
|
- }
|
|
|
|
|
- getSideData()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- //弹出框回车事件
|
|
|
|
|
- const handleGetYg = async () => {
|
|
|
|
|
- if (detailData.sczl_bh == '') {
|
|
|
|
|
- formElements = document.getElementById('detail-form').elements
|
|
|
|
|
- formElements[3].focus()
|
|
|
|
|
- formElements[3].select()
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await getYg({ sczl_bh: detailData.sczl_bh })
|
|
|
|
|
- if (response.code == 0) {
|
|
|
|
|
- if (response.data.length == 1) {
|
|
|
|
|
- detailData.name = response.data[0].ygxm
|
|
|
|
|
- detailData.sczl_bh = response.data[0].员工编号
|
|
|
|
|
- detailData.sczl_jsss = "0"
|
|
|
|
|
- // detailData.sczl_冲定额 = "0"
|
|
|
|
|
- formElements = document.getElementById('detail-form').elements
|
|
|
|
|
- formElements[3].focus()
|
|
|
|
|
- formElements[3].select()
|
|
|
|
|
- } else if (response.data.length > 1) {
|
|
|
|
|
- selectData_Yg.splice(0, selectData_Yg.length, ...response.data)
|
|
|
|
|
- setGXCurrent_Yg(selectData_Yg[0])
|
|
|
|
|
- dialogSelectVisible_Yg.value = true
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '未查询到该员工'
|
|
|
|
|
- })
|
|
|
|
|
- detailData.name = ''
|
|
|
|
|
- detailData.sczl_bh = ''
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- detailData.name = '';
|
|
|
|
|
- detailData.sczl_bh = '';
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const dialogSelectVisible_Yg = ref(false)
|
|
|
|
|
- const selectData_Yg = reactive([])
|
|
|
|
|
- // 处理选择框
|
|
|
|
|
- const handleSelectClick_Yg = (row, column, event) => {
|
|
|
|
|
- detailData.name = row.ygxm
|
|
|
|
|
- detailData.sczl_bh = row.员工编号
|
|
|
|
|
- dialogSelectVisible_Yg.value = false
|
|
|
|
|
- formElements = document.getElementById('detail-form').elements
|
|
|
|
|
- formElements[3].focus()
|
|
|
|
|
- formElements[3].select()
|
|
|
|
|
- }
|
|
|
|
|
- const currentIndex_Yg = ref(0);
|
|
|
|
|
- const GXCurrent_Yg = ref(0);
|
|
|
|
|
- const selectGX_Yg = (event) => {
|
|
|
|
|
- if (event.keyCode === 40) { // 向下箭头
|
|
|
|
|
- if (currentIndex_Yg.value < selectData_Yg.length - 1) {
|
|
|
|
|
- currentIndex_Yg.value++;
|
|
|
|
|
- setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]);
|
|
|
|
|
- } else {
|
|
|
|
|
- currentIndex_Yg.value = 0;
|
|
|
|
|
- setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]); // 到达最后一行时回到第一行
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 38) { // 向上箭头
|
|
|
|
|
- if (currentIndex_Yg.value > 0) {
|
|
|
|
|
- currentIndex_Yg.value--;
|
|
|
|
|
- setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]);
|
|
|
|
|
- } else {
|
|
|
|
|
- currentIndex_Yg.value = selectData_Yg.length - 1;
|
|
|
|
|
- setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]); // 到达第一行时回到最后一行
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 13) { // 回车键
|
|
|
|
|
- dialogSelectVisible_Yg.value = false;
|
|
|
|
|
- formElements = document.getElementById('detail-form').elements
|
|
|
|
|
- formElements[3].focus()
|
|
|
|
|
- formElements[3].select()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const table_Yg = ref()
|
|
|
|
|
- const setGXCurrent_Yg = (row) => {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- table_Yg.value?.setCurrentRow(row)
|
|
|
|
|
- detailData.name = row.ygxm
|
|
|
|
|
- detailData.sczl_bh = row.员工编号
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //班组回车事件
|
|
|
|
|
- const getBzsubmit = (event) => {
|
|
|
|
|
- if (event.keyCode !== 37){
|
|
|
|
|
- //弹出选择
|
|
|
|
|
- const data = [{
|
|
|
|
|
- 'sczl_bzdh': 'A班'
|
|
|
|
|
- }, {
|
|
|
|
|
- 'sczl_bzdh': 'B班'
|
|
|
|
|
- }]
|
|
|
|
|
- selectDataBz.splice(0, selectDataBz.length, ...data)
|
|
|
|
|
- if (dialogSelectVisible_Yg.value == false){
|
|
|
|
|
- BzVisible.value = true
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- setCurrent(data[0])
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- //冲月定额
|
|
|
|
|
- const getBzsubmit2 = (event) => {
|
|
|
|
|
- if (event.keyCode !== 37) {
|
|
|
|
|
- const data = [{
|
|
|
|
|
- 'sczl_冲定额': ' '
|
|
|
|
|
- }, {
|
|
|
|
|
- 'sczl_冲定额': '否'
|
|
|
|
|
- }]
|
|
|
|
|
- selectDataCY.splice(0, selectDataCY.length, ...data)
|
|
|
|
|
- BzVisible2.value = true
|
|
|
|
|
- setCurrent2(data[0])
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const dialogSelectVisible_Bz = ref(false)
|
|
|
|
|
- const selectData_Bz = reactive([])
|
|
|
|
|
- // 处理选择框
|
|
|
|
|
- const handleSelectClick_Bz = (row, column, event) => {
|
|
|
|
|
- detailData.sczl_bzdh = row.sczl_bzdh
|
|
|
|
|
- dialogSelectVisible_Bz.value = false
|
|
|
|
|
- }
|
|
|
|
|
- const currentIndex_Bz = ref(0);
|
|
|
|
|
- const GXCurrent_Bz = ref(0);
|
|
|
|
|
- const selectGX_Bz = (event) => {
|
|
|
|
|
- if (event.keyCode === 40) { // 向下箭头
|
|
|
|
|
- if (currentIndex_Bz.value < selectData_Bz.length - 1) {
|
|
|
|
|
- currentIndex_Bz.value++;
|
|
|
|
|
- setGXCurrent_Bz(selectData_Bz[currentIndex_Bz.value]);
|
|
|
|
|
- } else {
|
|
|
|
|
- currentIndex_Bz.value = 0;
|
|
|
|
|
- setGXCurrent_Bz(selectData_Bz[currentIndex_Bz.value]); // 到达最后一行时回到第一行
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 38) { // 向上箭头
|
|
|
|
|
- if (currentIndex_Bz.value > 0) {
|
|
|
|
|
- currentIndex_Bz.value--;
|
|
|
|
|
- setGXCurrent_Bz(selectData_Bz[currentIndex_Bz.value]);
|
|
|
|
|
- } else {
|
|
|
|
|
- currentIndex_Bz.value = selectData_Bz.length - 1;
|
|
|
|
|
- setGXCurrent_Bz(selectData_Bz[currentIndex_Bz.value]); // 到达第一行时回到最后一行
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 13) { // 回车键
|
|
|
|
|
- dialogSelectVisible_Bz.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const table_Bz = ref()
|
|
|
|
|
- const setGXCurrent_Bz = (row) => {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- table_Bz.value?.setCurrentRow(row)
|
|
|
|
|
- detailData.sczl_bzdh = row.sczl_bzdh
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 处理选择框回车操作
|
|
|
|
|
- const handleEnter = (index, row) => {
|
|
|
|
|
- detailData.table[index].sczl_dedh = '030002001'
|
|
|
|
|
- if (row.sczl_gdbh === '') {
|
|
|
|
|
- detailData.table[index].sczl_yjGx = ''
|
|
|
|
|
- detailData.table[index].sczl_gxmc = ''
|
|
|
|
|
- detailData.table[index].Gd_cpmc = ''
|
|
|
|
|
- } else {
|
|
|
|
|
- getTableGxMc(index, row)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 处理选择框
|
|
|
|
|
- const handleSelectClick = (row, column, event) => {
|
|
|
|
|
- const {
|
|
|
|
|
- Gd_cpmc,
|
|
|
|
|
- Gy0_gxmc,
|
|
|
|
|
- jyGx
|
|
|
|
|
- } = row
|
|
|
|
|
- const index = detailData.selectIndex
|
|
|
|
|
- detailData.table[index].Gd_cpmc = Gd_cpmc
|
|
|
|
|
- detailData.table[index].sczl_yjGx = jyGx
|
|
|
|
|
- detailData.table[index].sczl_gxmc = Gy0_gxmc
|
|
|
|
|
- dialogSelectVisible.value = false
|
|
|
|
|
- }
|
|
|
|
|
- const table2 = ref()
|
|
|
|
|
- const setCPCurrent = (row) => {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- table2.value?.setCurrentRow(row)
|
|
|
|
|
- const {
|
|
|
|
|
- Gd_cpmc,
|
|
|
|
|
- Gy0_gxmc,
|
|
|
|
|
- jyGx
|
|
|
|
|
- } = row
|
|
|
|
|
- const index = detailData.selectIndex
|
|
|
|
|
- detailData.table[index].Gd_cpmc = Gd_cpmc
|
|
|
|
|
- detailData.table[index].sczl_yjGx = jyGx
|
|
|
|
|
- detailData.table[index].sczl_gxmc = Gy0_gxmc
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- const CPIndex = ref(0);
|
|
|
|
|
- const JYCurrent = ref(0);
|
|
|
|
|
- const selectCP = (event) => {
|
|
|
|
|
- if (event.keyCode === 40) { // 向下箭头
|
|
|
|
|
- if (CPIndex.value < selectData.length - 1) {
|
|
|
|
|
- CPIndex.value++;
|
|
|
|
|
- setCPCurrent(selectData[CPIndex.value]);
|
|
|
|
|
- } else {
|
|
|
|
|
- CPIndex.value = 0;
|
|
|
|
|
- setCPCurrent(selectData[CPIndex.value]); // 到达最后一行时回到第一行
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 38) { // 向上箭头
|
|
|
|
|
- if (CPIndex.value > 0) {
|
|
|
|
|
- CPIndex.value--;
|
|
|
|
|
- setCPCurrent(selectData[CPIndex.value]);
|
|
|
|
|
- } else {
|
|
|
|
|
- CPIndex.value = selectData.length - 1;
|
|
|
|
|
- setCPCurrent(selectData[CPIndex.value]); // 到达第一行时回到最后一行
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 13) { // 回车键
|
|
|
|
|
- dialogSelectVisible.value = false
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- // 弹窗确定
|
|
|
|
|
- const enterDialog = () => {
|
|
|
|
|
- if (type.value === '查改') {
|
|
|
|
|
- updateDetailData()
|
|
|
|
|
- } else if (type.value === '新增') {
|
|
|
|
|
- addDetailData()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- //新增定额代号
|
|
|
|
|
- const dedhsearchModel = ref(false)
|
|
|
|
|
- const dedhtreeData = ref([])
|
|
|
|
|
- const table_dedh =ref()
|
|
|
|
|
- const _index = ref(null)
|
|
|
|
|
- // 定额代号回车事件
|
|
|
|
|
- const getDedhsubmit = async (index, row) => {
|
|
|
|
|
- if(detailData.table[index].sczl_dedh == '030002001'){
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- _index.value = index
|
|
|
|
|
- dedhsearchModel.value = true;
|
|
|
|
|
- const getPieceWorks = await getDedh();
|
|
|
|
|
- console.log(getPieceWorks);
|
|
|
|
|
- if (getPieceWorks.code === 0) {
|
|
|
|
|
- const transformItems = (items,indexs) => {
|
|
|
|
|
- return items.map((item,index) => ({
|
|
|
|
|
- id: `${indexs}-${index}`,
|
|
|
|
|
- label: `${item.sys_mc}【${item.sys_bh}】`,
|
|
|
|
|
- params: {
|
|
|
|
|
- code: item.sys_bh
|
|
|
|
|
- },
|
|
|
|
|
- children: item.bh_mc ? transformItems(item.bh_mc) : []
|
|
|
|
|
- }));
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- const transformedData2 = getPieceWorks.data.map((topItem,indexs) => ({
|
|
|
|
|
- id: indexs,
|
|
|
|
|
- label: `${topItem.sys_mc}【${topItem.sys_bh}】`,
|
|
|
|
|
- params: {
|
|
|
|
|
- code: topItem.sys_bh
|
|
|
|
|
- },
|
|
|
|
|
- children: topItem.bh_mc ? transformItems(topItem.bh_mc,indexs) : []
|
|
|
|
|
- }));
|
|
|
|
|
-
|
|
|
|
|
- dedhtreeData.value = transformedData2;
|
|
|
|
|
- console.log(transformedData2);
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- // 手动设置选中节点,如果默认选中不生效,可以使用此方法
|
|
|
|
|
- if (table_dedh.value) {
|
|
|
|
|
- const tree = table_dedh.value?.$el; // 访问组件实例的 $el
|
|
|
|
|
- if (tree) {
|
|
|
|
|
- // 通过DOM选择器查找节点
|
|
|
|
|
- const node = tree.querySelector('[data-key="0"]');
|
|
|
|
|
- if (node) {
|
|
|
|
|
- node.scrollIntoView();
|
|
|
|
|
- node.focus(); // 假设节点是可聚焦的
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 点击定额代号
|
|
|
|
|
- const dedhhandleNodeClick = (node, check) => {
|
|
|
|
|
- console.log(node);
|
|
|
|
|
- console.log(node.params.code);
|
|
|
|
|
- if (node.children && node.children.length > 0) {
|
|
|
|
|
- console.log(11);
|
|
|
|
|
- } else {
|
|
|
|
|
- detailData.table[_index.value].sczl_dedh = node.params.code
|
|
|
|
|
- dedhsearchModel.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- // dedhsearchModel.value = false;
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- let flag_Bz = true
|
|
|
|
|
- let formElements
|
|
|
|
|
- const moveFocus = (event) => {
|
|
|
|
|
- // console.log(formElements);
|
|
|
|
|
- const index = Array.from(formElements).indexOf(event.target);
|
|
|
|
|
- const key = event.key;
|
|
|
|
|
- // console.log(detailData);
|
|
|
|
|
- const currentInputValue = formElements[index].value;
|
|
|
|
|
- event.preventDefault();
|
|
|
|
|
- switch (index) {
|
|
|
|
|
- case 0:
|
|
|
|
|
- if (key === 'ArrowRight' ) {
|
|
|
|
|
- formElements[1].focus();
|
|
|
|
|
- formElements[1].select();
|
|
|
|
|
- } else if (key === 'ArrowLeft') {
|
|
|
|
|
- formElements[formElements.length - 1].focus();
|
|
|
|
|
- formElements[formElements.length - 1].select();
|
|
|
|
|
- } else if (key === 'Enter') {
|
|
|
|
|
- formElements[1].focus();
|
|
|
|
|
- formElements[1].select();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 1:
|
|
|
|
|
- if (key === 'ArrowRight') {
|
|
|
|
|
- formElements[3].focus();
|
|
|
|
|
- formElements[3].select();
|
|
|
|
|
- } else if (key === 'ArrowLeft') {
|
|
|
|
|
- formElements[0].focus();
|
|
|
|
|
- formElements[0].select();
|
|
|
|
|
- } else if (key === 'Enter') {
|
|
|
|
|
- handleGetYg();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
-
|
|
|
|
|
- case 3:
|
|
|
|
|
- if (key === 'ArrowRight') {
|
|
|
|
|
-
|
|
|
|
|
- formElements[4].focus();
|
|
|
|
|
- formElements[4].select();
|
|
|
|
|
- } else if (key === 'ArrowLeft') {
|
|
|
|
|
- formElements[1].focus();
|
|
|
|
|
- formElements[1].select();
|
|
|
|
|
- } else if (key === 'Enter') {
|
|
|
|
|
- formElements[4].focus();
|
|
|
|
|
- formElements[4].select();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
-
|
|
|
|
|
- case formElements.length - 1:
|
|
|
|
|
- if (key === 'ArrowRight') {
|
|
|
|
|
- formElements[0].focus();
|
|
|
|
|
- formElements[0].select();
|
|
|
|
|
- } else if (key === 'ArrowLeft') {
|
|
|
|
|
- formElements[index - 1].focus();
|
|
|
|
|
- formElements[index - 1].select();
|
|
|
|
|
- } else if (key === 'Enter') {
|
|
|
|
|
- formElements[0].focus();
|
|
|
|
|
- formElements[0].select();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
-
|
|
|
|
|
- default:
|
|
|
|
|
- if (key === 'ArrowRight') {
|
|
|
|
|
- formElements[index + 1].focus();
|
|
|
|
|
- formElements[index + 1].select();
|
|
|
|
|
- } else if (key === 'ArrowLeft') {
|
|
|
|
|
- formElements[index - 1].focus();
|
|
|
|
|
- formElements[index - 1].select();
|
|
|
|
|
- } else if (key === 'Enter') {
|
|
|
|
|
- formElements[index + 1].focus();
|
|
|
|
|
- formElements[index + 1].select();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <!-- 左侧树形结构 -->
|
|
|
|
|
+ <el-container>
|
|
|
|
|
+ <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;" >
|
|
|
|
|
+ <div class="JKWTree-tree" style="height: 70vh;">
|
|
|
|
|
+ <h3>服装半成品返工维护</h3>
|
|
|
|
|
+ <el-tree :data="treeData" highlight-current @node-click="handleNodeClick"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </layout-sider>
|
|
|
|
|
+ <el-container>
|
|
|
|
|
+
|
|
|
|
|
+ <el-main>
|
|
|
|
|
+ <!-- 按钮区域 -->
|
|
|
|
|
+ <div class="gva-table-box">
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-input v-model="positionvalue" @keydown="keydown_onSearch($event)" placeholder="输入工单编号或产品名称" style="width: 180px;" />
|
|
|
|
|
+ <el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
|
|
|
|
|
+ <el-button type="primary" class="bt" icon="plus" @click="onAdd">新增</el-button>
|
|
|
|
|
+ <el-button type="primary" class="bt" icon="delete" @click="Del">删除</el-button>
|
|
|
|
|
+ <div style="margin-left: auto;">
|
|
|
|
|
+ <el-button type="primary" :icon="Download" @click="exportExcel">导出到Excel</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <!-- 数据展示 -->
|
|
|
|
|
+ <el-table ref="multipleTable" style="width: 100%;height: 70vh;" tooltip-effect="dark" :data="tableData" row-key="ID"
|
|
|
|
|
+ highlight-current-row="true" border @selection-change="handleSelectionChange"
|
|
|
|
|
+ :row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
+ :show-overflow-tooltip="true" @row-click="Click" @row-dblclick="doubleClick">
|
|
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
|
|
+ <!-- 循环渲染列 -->
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-for=" column in tableColumns "
|
|
|
|
|
+ :key="column.prop"
|
|
|
|
|
+ :prop="column.prop"
|
|
|
|
|
+ :label="column.label"
|
|
|
|
|
+ :width="column.width"
|
|
|
|
|
+ sortable
|
|
|
|
|
+ show-overflow-tooltip="true"/>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <!-- 分页 -->
|
|
|
|
|
+ <div class="gva-pagination">
|
|
|
|
|
+ <el-pagination layout="total, sizes, prev, pager, next, jumper" v-model:current-page="page"
|
|
|
|
|
+ v-model:page-size="limit"
|
|
|
|
|
+ :page-sizes="[10, 30, 50, 100]" :total="total" @current-change="handleCurrentChange"
|
|
|
|
|
+ @size-change="handleSizeChange" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 弹出框 -->
|
|
|
|
|
+ <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '服装半成品返工报工页面' : '服装半成品返工报工修改'"
|
|
|
|
|
+ destroy-on-close width="1000px">
|
|
|
|
|
+ <el-form :model="formData" label-position="right" ref="elFormRef" :rules="rule" label-width="70px" >
|
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <el-form-item label="日期" prop="name">
|
|
|
|
|
+ <el-input type="date" max="9999-12-31" v-model="formData.sczl_rq" id="日期" @focus="rqHandleFocus()" @keydown="ent1($event)" style="width: 120px; " />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
|
+ <div style="width: 900px; margin-left: 20px;">
|
|
|
|
|
+ <div style="margin-bottom: 5px;">
|
|
|
|
|
+ <span style="display: inline-block; text-align: center; width: 220px; margin-right: 5px;" >工单号|款号</span>
|
|
|
|
|
+ <span style="display: inline-block; text-align: center; width: 110px; margin-left: 45px; margin-right: 5px;" >返工工序</span>
|
|
|
|
|
+ <span style="display: inline-block; text-align: center; width: 95px; margin-left: 10px; margin-right: 5px;" >返工数量</span>
|
|
|
|
|
+ <span style="display: inline-block; text-align: center; width: 130px; margin-left: -30 px;" >生产车缝小组</span>
|
|
|
|
|
+ <span style="display: inline-block; text-align: center; width: 130px; margin-right: 5px;" >返工车缝小组</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-for="index in 6" :key="index">
|
|
|
|
|
+ <el-input style="width: 220px; margin-left: 75px; margin-right: 5px;margin-bottom: 5px;" placeholder="Enter回车" v-model="formData['sczl_gdbh' + index]" :id="'sczl_gdbh' + index" @keydown="ent1($event, index.toString())" @blur="getGxMcsubmit($event, index.toString())" />
|
|
|
|
|
+ <el-select v-model="formData['sczl_fggx' + index]" style="width: 100px; margin-right: 5px;margin-bottom: 5px;" placeholder="请选择">
|
|
|
|
|
+ <el-option label="手工" value="手工"/>
|
|
|
|
|
+ <el-option label="大烫" value="大烫"/>
|
|
|
|
|
+ <el-option label="总检" value="总检"/>
|
|
|
|
|
+ <el-option label="包装" value="包装"/>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <el-input style="width: 95px; margin-right: 5px;margin-bottom: 5px;" :readonly="true" v-model="formData['sczl_gxmc' + index]" :id="'sczl_gxmc' + index" @keydown="ent1($event)"/>
|
|
|
|
|
+ <el-input style="width: 130px; margin-right: 5px;margin-bottom: 5px;" :readonly="true" v-model="formData['Gd_cpmc' + index]" :id="'Gd_cpmc' + index" @keydown="ent1($event)"/>
|
|
|
|
|
+ <el-input style="width: 130px; margin-right: 5px;margin-bottom: 5px;" v-model="formData['sczl_cl' + index]" :id="'sczl_cl' + index" @keydown="ent1($event)"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- </el-scrollbar> -->
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer" style="display: flex; margin-left: 500px;">
|
|
|
|
|
+ <p style="font-size: 18px;">报工人:
|
|
|
|
|
+ <el-input v-model="linguser" style="width: 200px;" />
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <el-button @click="closeDialog">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="enterDialog">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog v-model="positioningVisibleshow" :before-close="closepositioningVisible" :title="type==='create'?'添加':'修改'" destroy-on-close>
|
|
|
|
|
+ <el-card>
|
|
|
|
|
+ <el-form-item label="工单编号" prop="name">
|
|
|
|
|
+ <el-input v-model="positionvalue" :clearable="true" placeholder="ZT01733" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ <el-button type="primary" @click="enterpositioning">确 定</el-button>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog v-model="dialogSelectVisible" title="选择"
|
|
|
|
|
+ destroy-on-close width="800px" >
|
|
|
|
|
+ <el-table tooltip-effect="dark" :data="selectData" row-key="ID"
|
|
|
|
|
+ highlight-current-row="true" border style="width:100%"
|
|
|
|
|
+ @row-dblclick="handleSelectClick" >
|
|
|
|
|
+ <el-table-column prop="Gd_cpmc" label="印件名称" width="450" />
|
|
|
|
|
+ <el-table-column prop="jyGx" label="检验工序" width="85" />
|
|
|
|
|
+ <el-table-column prop="Gy0_gxmc" label="工序名称" width="225" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog v-model="getGxMcshow" :before-close="closegetGxMcshow" title="工序选择" destroy-on-close width="630px" >
|
|
|
|
|
+ <el-table tooltip-effect="dark" :data="selectData"
|
|
|
|
|
+ row-key="ID" highlight-current-row="true"
|
|
|
|
|
+ border style="width:100%"
|
|
|
|
|
+ @row-dblclick="handleSelectClick">
|
|
|
|
|
+ <el-table-column prop="jyGx" label="印件工序" width="100" />
|
|
|
|
|
+ <el-table-column prop="Gd_cpmc" label="印件名称"/>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button @click="closegetGxMcshow">取 消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ </el-main>
|
|
|
|
|
+ </el-container>
|
|
|
|
|
+ </el-container>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <script setup>
|
|
|
|
|
+ // 全量引入格式化工具 请按需保留
|
|
|
|
|
+ import { ElMessage, ElMessageBox, LAST_KEYS } from 'element-plus'
|
|
|
|
|
+// import { Search, Refresh, Download } from '@element-plus/icons-vue'
|
|
|
|
|
+ import { ref, reactive, nextTick, onMounted, onBeforeMount } from 'vue'
|
|
|
|
|
+// import { } from '@/api/mes_api_gty/myapi'
|
|
|
|
|
+ import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
|
|
|
|
|
+ import { useUserStore } from '@/pinia/modules/user'
|
|
|
|
|
+ const userStore = useUserStore()
|
|
|
|
|
+ const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
|
|
|
|
|
+ defineOptions({name: '06-packingDocuments'})
|
|
|
|
|
+
|
|
|
|
|
+ // 侧边栏数据请求
|
|
|
|
|
+ const treeData = reactive([]);
|
|
|
|
|
+
|
|
|
|
|
+// const getTabdata = async () => {
|
|
|
|
|
+
|
|
|
|
|
+// }
|
|
|
|
|
+// getTabdata();
|
|
|
|
|
+
|
|
|
|
|
+ // 自动化生成的字典(可能为空)以及字段
|
|
|
|
|
+ const formData = ref({
|
|
|
|
|
+ sczl_rq: '',
|
|
|
|
|
+ sczl_gdbh1: '',
|
|
|
|
|
+ sczl_gdbh2: '',
|
|
|
|
|
+ sczl_gdbh3: '',
|
|
|
|
|
+ sczl_gdbh4: '',
|
|
|
|
|
+ sczl_gdbh5: '',
|
|
|
|
|
+ sczl_gdbh6: '',
|
|
|
|
|
+ sczl_fggx1: '',
|
|
|
|
|
+ sczl_fggx2: '',
|
|
|
|
|
+ sczl_fggx3: '',
|
|
|
|
|
+ sczl_fggx4: '',
|
|
|
|
|
+ sczl_fggx5: '',
|
|
|
|
|
+ sczl_fggx6: '',
|
|
|
|
|
+ sczl_gxmc1: '',
|
|
|
|
|
+ sczl_gxmc2: '',
|
|
|
|
|
+ sczl_gxmc3: '',
|
|
|
|
|
+ sczl_gxmc4: '',
|
|
|
|
|
+ sczl_gxmc5: '',
|
|
|
|
|
+ sczl_gxmc6: '',
|
|
|
|
|
+ Gd_cpmc1: '',
|
|
|
|
|
+ Gd_cpmc2: '',
|
|
|
|
|
+ Gd_cpmc3: '',
|
|
|
|
|
+ Gd_cpmc4: '',
|
|
|
|
|
+ Gd_cpmc5: '',
|
|
|
|
|
+ Gd_cpmc6: '',
|
|
|
|
|
+ sczl_cl1: '0.00',
|
|
|
|
|
+ sczl_cl2: '0.00',
|
|
|
|
|
+ sczl_cl3: '0.00',
|
|
|
|
|
+ sczl_cl4: '0.00',
|
|
|
|
|
+ sczl_cl5: '0.00',
|
|
|
|
|
+ sczl_cl6: '0.00',
|
|
|
|
|
+ sczl_PgCl1:'0',
|
|
|
|
|
+ sczl_PgCl2: '0',
|
|
|
|
|
+ sczl_PgCl3: '0',
|
|
|
|
|
+ sczl_PgCl4: '0',
|
|
|
|
|
+ sczl_PgCl5: '0',
|
|
|
|
|
+ sczl_PgCl6: '0',
|
|
|
|
|
+ sczl_clAdd1: '0',
|
|
|
|
|
+ sczl_clAdd2: '0',
|
|
|
|
|
+ sczl_clAdd3: '0',
|
|
|
|
|
+ sczl_clAdd4: '0',
|
|
|
|
|
+ sczl_clAdd5: '0',
|
|
|
|
|
+ sczl_clAdd6: '0',
|
|
|
|
|
+ UniqId:'000',
|
|
|
|
|
+ })
|
|
|
|
|
+ const initFormData = () => {
|
|
|
|
|
+ formData.value = {
|
|
|
|
|
+ sczl_rq: '',
|
|
|
|
|
+ sczl_gdbh1: '',
|
|
|
|
|
+ sczl_gdbh2: '',
|
|
|
|
|
+ sczl_gdbh3: '',
|
|
|
|
|
+ sczl_gdbh4: '',
|
|
|
|
|
+ sczl_gdbh5: '',
|
|
|
|
|
+ sczl_gdbh6: '',
|
|
|
|
|
+ sczl_fggx1: '',
|
|
|
|
|
+ sczl_fggx2: '',
|
|
|
|
|
+ sczl_fggx3: '',
|
|
|
|
|
+ sczl_fggx4: '',
|
|
|
|
|
+ sczl_fggx5: '',
|
|
|
|
|
+ sczl_fggx6: '',
|
|
|
|
|
+ sczl_gxmc1: '',
|
|
|
|
|
+ sczl_gxmc2: '',
|
|
|
|
|
+ sczl_gxmc3: '',
|
|
|
|
|
+ sczl_gxmc4: '',
|
|
|
|
|
+ sczl_gxmc5: '',
|
|
|
|
|
+ sczl_gxmc6: '',
|
|
|
|
|
+ Gd_cpmc1: '',
|
|
|
|
|
+ Gd_cpmc2: '',
|
|
|
|
|
+ Gd_cpmc3: '',
|
|
|
|
|
+ Gd_cpmc4: '',
|
|
|
|
|
+ Gd_cpmc5: '',
|
|
|
|
|
+ Gd_cpmc6: '',
|
|
|
|
|
+ sczl_cl1: '0.00',
|
|
|
|
|
+ sczl_cl2: '0.00',
|
|
|
|
|
+ sczl_cl3: '0.00',
|
|
|
|
|
+ sczl_cl4: '0.00',
|
|
|
|
|
+ sczl_cl5: '0.00',
|
|
|
|
|
+ sczl_cl6: '0.00',
|
|
|
|
|
+ sczl_PgCl1:'0',
|
|
|
|
|
+ sczl_PgCl2: '0',
|
|
|
|
|
+ sczl_PgCl3: '0',
|
|
|
|
|
+ sczl_PgCl4: '0',
|
|
|
|
|
+ sczl_PgCl5: '0',
|
|
|
|
|
+ sczl_PgCl6: '0',
|
|
|
|
|
+ sczl_clAdd1: '0',
|
|
|
|
|
+ sczl_clAdd2: '0',
|
|
|
|
|
+ sczl_clAdd3: '0',
|
|
|
|
|
+ sczl_clAdd4: '0',
|
|
|
|
|
+ sczl_clAdd5: '0',
|
|
|
|
|
+ sczl_clAdd6: '0',
|
|
|
|
|
+ UniqId:'000',
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ const elFormRef = ref()
|
|
|
|
|
+ const elSearchFormRef = ref()
|
|
|
|
|
+ // =========== 表格控制部分 ===========
|
|
|
|
|
+ const tableData = reactive([])
|
|
|
|
|
+ const GxMctableData = reactive([])
|
|
|
|
|
+ const tableColumns = [
|
|
|
|
|
+ { label: '创建用户', prop: 'sys_id', width: '200' },
|
|
|
|
|
+ { label: '日期', prop: 'sczl_rq', width: '100' },
|
|
|
|
|
+ { label: '包装产量', prop: 'sczl_cl', width: '105' },
|
|
|
|
|
+ { label: '包装数量', prop: 'sczl_PgCl', width: '105' },
|
|
|
|
|
+ { label: '创建时间', prop: 'sys_rq', width: '160' },
|
|
|
|
|
+ { label: '修改时间', prop: 'mod_rq', width: '160' },
|
|
|
|
|
+ { label: 'UNIQID', prop: 'UniqId', width: '120' },
|
|
|
|
|
+ ]
|
|
|
|
|
+
|
|
|
|
|
+ // 总条数
|
|
|
|
|
+ const total = ref(0);
|
|
|
|
|
+ // 当前页码
|
|
|
|
|
+ const page = ref(1);
|
|
|
|
|
+ // 每页条数
|
|
|
|
|
+ const limit = ref(50);
|
|
|
|
|
+ // 搜索关键字
|
|
|
|
|
+ const searchInfo = ref('');
|
|
|
|
|
+ // 查询参数
|
|
|
|
|
+ const params = ref({
|
|
|
|
|
+ // type: 'getTableData', // 默认查询类型
|
|
|
|
|
+ type: '',
|
|
|
|
|
+ date: '',
|
|
|
|
|
+ sys_id: '',
|
|
|
|
|
+ gdbh: '',
|
|
|
|
|
+ limit: limit.value, // 每页条数
|
|
|
|
|
+ page: page.value, // 当前页码
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const inputname=ref(0)
|
|
|
|
|
+
|
|
|
|
|
+ const locatevalue={
|
|
|
|
|
+ gdbh:'',
|
|
|
|
|
+ cpmc:'',
|
|
|
|
|
+ page:page.value.toString(),
|
|
|
|
|
+ limit:limit.value.toString(),
|
|
|
|
|
+ }
|
|
|
|
|
+ let table=ref(5);
|
|
|
|
|
+ let positionvalue=ref()
|
|
|
|
|
+ let GxMcvalue=ref()
|
|
|
|
|
+
|
|
|
|
|
+ // 分页设置
|
|
|
|
|
+ const handleSizeChange = (val) => {
|
|
|
|
|
+ params.page = val;
|
|
|
|
|
+ switch (params.type) {
|
|
|
|
|
+ case 'getTableData':
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ break
|
|
|
|
|
+ case 'getLocateTable':
|
|
|
|
|
+ Getlocate()
|
|
|
|
|
+ break
|
|
|
|
|
+ default:
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 页面跳转
|
|
|
|
|
+ const handleCurrentChange = (val) => {
|
|
|
|
|
+ params.page = val;
|
|
|
|
|
+ switch (params.type) {
|
|
|
|
|
+ case 'getTableData':
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ break
|
|
|
|
|
+ case 'getLocateTable':
|
|
|
|
|
+ Getlocate()
|
|
|
|
|
+ break
|
|
|
|
|
+ default:
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+// // 查询
|
|
|
|
|
+// const getTableData = async () => {
|
|
|
|
|
+// console.log(params)
|
|
|
|
|
+// const response = await getList(params);
|
|
|
|
|
+// if (response.code === 0) {
|
|
|
|
|
+// tableData.splice(0, tableData.length, ...response.data.rows);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+// const handleNodeClick = (node, check) => {
|
|
|
|
|
+// //存放当前节点的nodeId
|
|
|
|
|
+// if (node.params) {
|
|
|
|
|
+// params.date = node.params.date;
|
|
|
|
|
+// params.sys_id = node.params.sys_id;
|
|
|
|
|
+// total.value = node.params.total;
|
|
|
|
|
+// getTableData();
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// const Getlocate = async () => {
|
|
|
|
|
+// const response = await locate({
|
|
|
|
|
+// gdbh: params.gdbh,
|
|
|
|
|
+// page: page.value.toString(), limit: limit.value.toString(),
|
|
|
|
|
+// })
|
|
|
|
|
+// if (response.code === 0) {
|
|
|
|
|
+// total.value = response.data.total
|
|
|
|
|
+// tableData.splice(0, tableData.length, ...response.data.rows)
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// //确定
|
|
|
|
|
+// const enterpositioning = async () => {
|
|
|
|
|
+// locatevalue.gdbh = positionvalue.value;
|
|
|
|
|
+// Getlocate()
|
|
|
|
|
+// closepositioningVisible()
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+// let sczl_rqValue=ref()
|
|
|
|
|
+// const getpickInfo = async (value) => {
|
|
|
|
|
+// const response = await getInfo({UniqId:value});
|
|
|
|
|
+// if (response.code === 0) {
|
|
|
|
|
+// formData.value=response.data;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+// //键盘 input框跳转
|
|
|
|
|
+// const ent1 = (event) => {
|
|
|
|
|
+// const inputs = document.getElementsByTagName('input');
|
|
|
|
|
+// const currentIndex = Array.from(inputs).indexOf(event.target);
|
|
|
|
|
+// if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
|
|
|
|
|
+// if(event.target.id=='sczl_clAdd6'){
|
|
|
|
|
+// ElMessageBox.confirm('数据存盘?', '提示', {
|
|
|
|
|
+// confirmButtonText: '确定',
|
|
|
|
|
+// cancelButtonText: '取消',
|
|
|
|
|
+// type: 'warning'
|
|
|
|
|
+// }).then(() => {
|
|
|
|
|
+// enterDialog()
|
|
|
|
|
+// })
|
|
|
|
|
+// }
|
|
|
|
|
+// for (let i = currentIndex + 1; i < inputs.length; i++) {
|
|
|
|
|
+// if (!inputs[i].readOnly) {
|
|
|
|
|
+// nextTick(()=>{
|
|
|
|
|
+// inputs[i].focus();
|
|
|
|
|
+// inputs[i].select();
|
|
|
|
|
+// })
|
|
|
|
|
+// break;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
|
|
+// ent_sum()
|
|
|
|
|
+// }
|
|
|
|
|
+// } else if (event.keyCode === 38) { // 向上箭头
|
|
|
|
|
+// for (let i = currentIndex - 1; i >= 0; i--) {
|
|
|
|
|
+// if (!inputs[i].readOnly) {
|
|
|
|
|
+// nextTick(()=>{
|
|
|
|
|
+// inputs[i].focus();
|
|
|
|
|
+// inputs[i].select();
|
|
|
|
|
+// })
|
|
|
|
|
+// break;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
|
|
+// ent_sum()
|
|
|
|
|
+// }
|
|
|
|
|
+// } else if (event.keyCode === 8) { // 删除箭头
|
|
|
|
|
+// if (event.target.selectionStart === 0) {
|
|
|
|
|
+// for (let i = currentIndex - 1; i >= 0; i--) {
|
|
|
|
|
+// if (!inputs[i].readOnly) {
|
|
|
|
|
+// nextTick(()=>{
|
|
|
|
|
+// inputs[i].focus();
|
|
|
|
|
+// inputs[i].setSelectionRange(0, 0);
|
|
|
|
|
+// })
|
|
|
|
|
+// break;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
|
|
+// ent_sum()
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// } else if (event.keyCode === 37) { // 向左箭头
|
|
|
|
|
+// if (event.target.selectionStart === 0) {
|
|
|
|
|
+// for (let i = currentIndex - 1; i >= 0; i--) {
|
|
|
|
|
+// if (!inputs[i].readOnly) {
|
|
|
|
|
+// nextTick(()=>{
|
|
|
|
|
+// inputs[i].focus();
|
|
|
|
|
+// inputs[i].select();
|
|
|
|
|
+// })
|
|
|
|
|
+// break;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
|
|
+// ent_sum()
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// } else if (event.keyCode === 39) { // 向右箭头
|
|
|
|
|
+// if(event.target.id=='sczl_clAdd6'){
|
|
|
|
|
+// ElMessageBox.confirm('数据存盘?', '提示', {
|
|
|
|
|
+// confirmButtonText: '确定',
|
|
|
|
|
+// cancelButtonText: '取消',
|
|
|
|
|
+// type: 'warning'
|
|
|
|
|
+// }).then(() => {
|
|
|
|
|
+// enterDialog()
|
|
|
|
|
+// })
|
|
|
|
|
+// }
|
|
|
|
|
+// if (event.target.selectionStart === event.target.value.length) {
|
|
|
|
|
+// for (let i = currentIndex + 1; i < inputs.length; i++) {
|
|
|
|
|
+// if (!inputs[i].readOnly) {
|
|
|
|
|
+// nextTick(()=>{
|
|
|
|
|
+// inputs[i].focus();
|
|
|
|
|
+// inputs[i].select();
|
|
|
|
|
+// })
|
|
|
|
|
+// break;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// if(event.target.id.substring(0, 2)=='cl' || event.target.id.substring(0, 2)=='fp'){
|
|
|
|
|
+// ent_sum()
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+ //追加字体颜色和不可输入
|
|
|
|
|
+ const setColorReadonly = (id) => {
|
|
|
|
|
+ const newInput = document.getElementById(id)
|
|
|
|
|
+ newInput.style.color = 'red';
|
|
|
|
|
+ newInput.setAttribute('readonly', true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //追加字体颜色和可输入
|
|
|
|
|
+ const unsetColorReadonly = (id) => {
|
|
|
|
|
+ const newInput = document.getElementById(id)
|
|
|
|
|
+ newInput.style.color = 'black';
|
|
|
|
|
+ newInput.removeAttribute('readonly');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //日期获得焦点事件
|
|
|
|
|
+ const rqHandleFocus = () =>{
|
|
|
|
|
+ if(formData.value.sczl_rq==''){
|
|
|
|
|
+ formData.value.sczl_rq = new Date().toISOString().split('T')[0]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //工单编号失去焦点事件
|
|
|
|
|
+ const getGxMcshow = ref(false)
|
|
|
|
|
+ const selectData = reactive([])
|
|
|
|
|
+ let tableIndex = 0
|
|
|
|
|
+
|
|
|
|
|
+ const getGxMcsubmit = async (event, index) => {
|
|
|
|
|
+ if(formData.value['sczl_gdbh'+index]!=''){
|
|
|
|
|
+ const response = await getGxMc({gdbh: formData.value['sczl_gdbh'+index] })
|
|
|
|
|
+ if (response.code === 0) {
|
|
|
|
|
+ if(response.data.length==0){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: '查无此编号的工单,请仔细检查后重新输入'
|
|
|
|
|
+ })
|
|
|
|
|
+ //设置输入框的值为空
|
|
|
|
|
+ formData.value['sczl_gdbh'+index] = ''
|
|
|
|
|
+ formData.value['Gd_cpmc'+index] = ''
|
|
|
|
|
+ formData.value['sczl_fggx'+index] = ''
|
|
|
|
|
+ formData.value['sczl_gxmc'+index] = ''
|
|
|
|
|
+ }else if(response.data.length==1){
|
|
|
|
|
+ const { Gd_cpmc, Gy0_gxmc, jyGx } = response.data[0]
|
|
|
|
|
+ formData.value['Gd_cpmc'+index] = Gd_cpmc
|
|
|
|
|
+ formData.value['sczl_fggx'+index] = jyGx
|
|
|
|
|
+ formData.value['sczl_gxmc'+index] = Gy0_gxmc
|
|
|
|
|
+ setColorReadonly('Gd_cpmc'+index);
|
|
|
|
|
+ setColorReadonly('sczl_fggx'+index);
|
|
|
|
|
+ setColorReadonly('sczl_gxmc'+index);
|
|
|
|
|
+ unsetColorReadonly('sczl_cl'+index);
|
|
|
|
|
+ unsetColorReadonly('sczl_PgCl'+index);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ selectData.splice(0, selectData.length, ...response.data)
|
|
|
|
|
+ tableIndex = index
|
|
|
|
|
+ getGxMcshow.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ formData.value['Gd_cpmc'+index] = ''
|
|
|
|
|
+ formData.value['sczl_fggx'+index] = ''
|
|
|
|
|
+ formData.value['sczl_gxmc'+index] = ''
|
|
|
|
|
+ formData.value['sczl_cl'+index] = '0.00'
|
|
|
|
|
+ formData.value['sczl_PgCl'+index] = '0'
|
|
|
|
|
+ setColorReadonly('sczl_cl'+index);
|
|
|
|
|
+ setColorReadonly('sczl_PgCl'+index);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ // 处理选择框
|
|
|
|
|
+ const handleSelectClick = (row, column, event) => {
|
|
|
|
|
+ const { Gd_cpmc, Gy0_gxmc, jyGx } = row
|
|
|
|
|
+ formData.value['Gd_cpmc'+tableIndex] = Gd_cpmc
|
|
|
|
|
+ formData.value['sczl_fggx'+tableIndex] = jyGx
|
|
|
|
|
+ formData.value['sczl_gxmc'+tableIndex] = Gy0_gxmc
|
|
|
|
|
+ setColorReadonly('Gd_cpmc'+tableIndex);
|
|
|
|
|
+ setColorReadonly('sczl_fggx'+tableIndex);
|
|
|
|
|
+ setColorReadonly('sczl_gxmc'+tableIndex);
|
|
|
|
|
+ unsetColorReadonly('sczl_cl'+tableIndex);
|
|
|
|
|
+ unsetColorReadonly('sczl_PgCl'+tableIndex);
|
|
|
|
|
+ getGxMcshow.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // 更新数据
|
|
|
|
|
+ const updateDetailData = async() => {
|
|
|
|
|
+ const restoredData = {
|
|
|
|
|
+ UniqId: lastCellValue,
|
|
|
|
|
+ sczl_rq: formData.value.sczl_rq,
|
|
|
|
|
+ sczl_gdbh1: formData.value.sczl_gdbh1,
|
|
|
|
|
+ sczl_gdbh2: formData.value.sczl_gdbh2,
|
|
|
|
|
+ sczl_gdbh3: formData.value.sczl_gdbh3,
|
|
|
|
|
+ sczl_gdbh4: formData.value.sczl_gdbh4,
|
|
|
|
|
+ sczl_gdbh5: formData.value.sczl_gdbh5,
|
|
|
|
|
+ sczl_gdbh6: formData.value.sczl_gdbh6,
|
|
|
|
|
+ sczl_fggx1: formData.value.sczl_fggx1,
|
|
|
|
|
+ sczl_fggx2: formData.value.sczl_fggx2,
|
|
|
|
|
+ sczl_fggx3: formData.value.sczl_fggx3,
|
|
|
|
|
+ sczl_fggx4: formData.value.sczl_fggx4,
|
|
|
|
|
+ sczl_fggx5: formData.value.sczl_fggx5,
|
|
|
|
|
+ sczl_fggx6: formData.value.sczl_fggx6,
|
|
|
|
|
+ sczl_gxmc1: formData.value.sczl_gxmc1,
|
|
|
|
|
+ sczl_gxmc2: formData.value.sczl_gxmc2,
|
|
|
|
|
+ sczl_gxmc3: formData.value.sczl_gxmc3,
|
|
|
|
|
+ sczl_gxmc4: formData.value.sczl_gxmc4,
|
|
|
|
|
+ sczl_gxmc5: formData.value.sczl_gxmc5,
|
|
|
|
|
+ sczl_gxmc6: formData.value.sczl_fggx6,
|
|
|
|
|
+ sczl_cl1: formData.value.sczl_cl1,
|
|
|
|
|
+ sczl_cl2: formData.value.sczl_cl2,
|
|
|
|
|
+ sczl_cl3: formData.value.sczl_cl3,
|
|
|
|
|
+ sczl_cl4: formData.value.sczl_cl4,
|
|
|
|
|
+ sczl_cl5: formData.value.sczl_cl5,
|
|
|
|
|
+ sczl_cl6: formData.value.sczl_cl6,
|
|
|
|
|
+ sczl_PgCl1:formData.value.sczl_PgCl1,
|
|
|
|
|
+ sczl_PgCl2: formData.value.sczl_PgCl2,
|
|
|
|
|
+ sczl_PgCl3: formData.value.sczl_PgCl3,
|
|
|
|
|
+ sczl_PgCl4: formData.value.sczl_PgCl4,
|
|
|
|
|
+ sczl_PgCl5: formData.value.sczl_PgCl5,
|
|
|
|
|
+ sczl_PgCl6: formData.value.sczl_PgCl6,
|
|
|
|
|
+ Gd_cpmc1: formData.value.Gd_cpmc1,
|
|
|
|
|
+ Gd_cpmc3: formData.value.Gd_cpmc2,
|
|
|
|
|
+ Gd_cpmc4: formData.value.Gd_cpmc3,
|
|
|
|
|
+ Gd_cpmc5: formData.value.Gd_cpmc4,
|
|
|
|
|
+ Gd_cpmc6: formData.value.Gd_cpmc5,
|
|
|
|
|
+ sczl_clAdd1: formData.value.sczl_clAdd1,
|
|
|
|
|
+ sczl_clAdd2: formData.value.sczl_clAdd2,
|
|
|
|
|
+ sczl_clAdd3: formData.value.sczl_clAdd3,
|
|
|
|
|
+ sczl_clAdd4: formData.value.sczl_clAdd4,
|
|
|
|
|
+ sczl_clAdd5:formData.value.sczl_clAdd5,
|
|
|
|
|
+ sczl_clAdd6: formData.value.sczl_clAdd6,
|
|
|
|
|
+ sys_id:sys_id,
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(ADD.value=='新增'){
|
|
|
|
|
+ const response = await packagingAdd(restoredData);
|
|
|
|
|
+ ADD.value='0'
|
|
|
|
|
+ if(response.code==0){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: '新增成功',
|
|
|
|
|
+ })
|
|
|
|
|
+ dialogFormVisible.value = false
|
|
|
|
|
+ //刷新侧边栏
|
|
|
|
|
+ getTabdata()
|
|
|
|
|
+ if(params.date != ''){
|
|
|
|
|
+ //刷新页面
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const res = await edit(restoredData)
|
|
|
|
|
+ if(res.code==0){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: '更新成功',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ dialogFormVisible.value = false
|
|
|
}
|
|
}
|
|
|
-};
|
|
|
|
|
- const movefous2 = (event,row,index)=>{
|
|
|
|
|
- const index2 = Array.from(formElements).indexOf(event.target)
|
|
|
|
|
- if (row.sczl_dedh != '' & event.key === "ArrowRight"){
|
|
|
|
|
- event.stopPropagation();
|
|
|
|
|
- formElements[index2+2].focus();
|
|
|
|
|
- formElements[index2+2].select();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- const movefous = (event,row,index)=>{
|
|
|
|
|
- const index2 = Array.from(formElements).indexOf(event.target)
|
|
|
|
|
- if (row.sczl_dedh != '' & event.key === "ArrowLeft"){
|
|
|
|
|
- event.stopPropagation();
|
|
|
|
|
- formElements[index2-2].focus();
|
|
|
|
|
- formElements[index2-2].select();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
-<style scoped>
|
|
|
|
|
- :deep(.plan-usage-low div) {
|
|
|
|
|
- color: red !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .JKWTree-container {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .JKWTree-tree {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- /*background-color: rgba(241, 224, 224, 0.99);*/
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
- margin-right: 20px;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .JKWTree-tree h3 {
|
|
|
|
|
- font-size: 15px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- margin: 10px 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .JKWTree-content {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- :deep(.el-table__body .warning-row) {
|
|
|
|
|
- background: #FFFF80 !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /* 选中某行时的背景色 */
|
|
|
|
|
- :deep(.el-table__body tr.current-row)>td {
|
|
|
|
|
- background: #ff80ff !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- :deep(.el-table .bg-yellow) {
|
|
|
|
|
- background: yellow;
|
|
|
|
|
- }
|
|
|
|
|
-</style>
|
|
|
|
|
-<style scoped>
|
|
|
|
|
- :deep(.el-table td .cell) {
|
|
|
|
|
- line-height: 25px !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- :deep(.el-tabs__header) {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .search {
|
|
|
|
|
- margin-left: 0px !important;
|
|
|
|
|
- margin-right: 10px !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .bt {
|
|
|
|
|
- margin-left: 2px !important;
|
|
|
|
|
- padding: 3px !important;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .el-tabs__header {
|
|
|
|
|
- margin: 0px !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .gva-table-box {
|
|
|
|
|
- padding: 0px !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .mab {
|
|
|
|
|
- margin-bottom: 5px;
|
|
|
|
|
- }
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ const GxMcdel = () => {
|
|
|
|
|
+ if(typeof(lastCellValue)=='object'){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: '未选中记录',
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
|
+ `确认删除这条数据么?`,
|
|
|
|
|
+ '警告',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: '确认',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ }
|
|
|
|
|
+ ).then(async() => {
|
|
|
|
|
+ const response = await del({UniqId:lastCellValue});
|
|
|
|
|
+ if (response.code === 0) {
|
|
|
|
|
+ ElMessage({type: 'success',message: '删除成功',})
|
|
|
|
|
+ //刷新侧边栏
|
|
|
|
|
+ getTabdata()
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //搜索按钮
|
|
|
|
|
+ const onSearch = async (event) => {
|
|
|
|
|
+ params.gdbh = positionvalue.value
|
|
|
|
|
+ params.type = 'getLocateTable'
|
|
|
|
|
+ page.value = 1
|
|
|
|
|
+ Getlocate()
|
|
|
|
|
+ }
|
|
|
|
|
+ //回车搜索
|
|
|
|
|
+ const keydown_onSearch = async (event) => {
|
|
|
|
|
+ const inputs = document.getElementsByTagName("input");
|
|
|
|
|
+ const currentIndex = Array.from(inputs).indexOf(event.target);
|
|
|
|
|
+ if(event.keyCode === 13){
|
|
|
|
|
+ params.gdbh = positionvalue.value
|
|
|
|
|
+ params.type = 'getLocateTable'
|
|
|
|
|
+ page.value = 1
|
|
|
|
|
+ Getlocate()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // ============== 表格控制部分结束 ===============
|
|
|
|
|
+
|
|
|
|
|
+ // 获取需要的字典 可能为空 按需保留
|
|
|
|
|
+ const setOptions = async () => {
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 获取需要的字典 可能为空 按需保留
|
|
|
|
|
+ setOptions()
|
|
|
|
|
+
|
|
|
|
|
+ // 多选数据
|
|
|
|
|
+ const multipleSelection = ref([])
|
|
|
|
|
+ // 多选
|
|
|
|
|
+ const handleSelectionChange = (val) => {
|
|
|
|
|
+ if(val.length>0){
|
|
|
|
|
+ multipleSelection.value = val
|
|
|
|
|
+ const lenth=val.length
|
|
|
|
|
+ lastCellValue=val[lenth-1].UniqId
|
|
|
|
|
+ console.log(val)
|
|
|
|
|
+ val.splice(0, val.length); // 清空 val 数组
|
|
|
|
|
+ console.log(lastCellValue)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 批量删除控制标记
|
|
|
|
|
+ const deleteVisible = ref(false)
|
|
|
|
|
+
|
|
|
|
|
+ // 多选删除
|
|
|
|
|
+ const onDelete = async () => {
|
|
|
|
|
+ const ids = []
|
|
|
|
|
+ if (multipleSelection.value.length === 0) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: '请选择要删除的数据'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ multipleSelection.value &&
|
|
|
|
|
+ multipleSelection.value.map(item => {
|
|
|
|
|
+ ids.push(item.ID)
|
|
|
|
|
+ })
|
|
|
|
|
+ const res = await deleteCompanyByIds({ ids })
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: '删除成功'
|
|
|
|
|
+ })
|
|
|
|
|
+ if (tableData.value.length === ids.length && page.value > 1) {
|
|
|
|
|
+ page.value--
|
|
|
|
|
+ }
|
|
|
|
|
+ deleteVisible.value = false
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 弹窗控制标记
|
|
|
|
|
+ const dialogFormVisible = ref(false)
|
|
|
|
|
+
|
|
|
|
|
+ // 行为控制标记(弹窗内部需要增还是改)
|
|
|
|
|
+ const type = ref('')
|
|
|
|
|
+
|
|
|
|
|
+ // 更新行
|
|
|
|
|
+ const updateCompanyFunc = async (row) => {
|
|
|
|
|
+ const res = await findCompany({ ID: row.ID })
|
|
|
|
|
+ type.value = 'update'
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ formData.value = res.data.recompany
|
|
|
|
|
+ dialogFormVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //新增
|
|
|
|
|
+ const ADD=ref('0')
|
|
|
|
|
+ const onAdd = async () => {
|
|
|
|
|
+ ADD.value='新增'
|
|
|
|
|
+ type.value = 'create'
|
|
|
|
|
+ initFormData()
|
|
|
|
|
+ dialogFormVisible.value = true
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ const inputElement = document.getElementById('日期');
|
|
|
|
|
+ if (inputElement) {
|
|
|
|
|
+ inputElement.focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const Del = () => {
|
|
|
|
|
+ GxMcdel()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /*
|
|
|
|
|
+ 新增弹窗控制标记
|
|
|
|
|
+ */
|
|
|
|
|
+ const positioningVisibleshow = ref(false)
|
|
|
|
|
+ const closepositioningVisible = () => {
|
|
|
|
|
+ positioningVisibleshow.value = false
|
|
|
|
|
+ formData.value = {
|
|
|
|
|
+ address: '',
|
|
|
|
|
+ image: '',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 新增工单弹窗取消
|
|
|
|
|
+ const closegetGxMcshow = () => {
|
|
|
|
|
+ getGxMcshow.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 打开弹窗
|
|
|
|
|
+ const openDialog = () => {
|
|
|
|
|
+ type.value = 'create'
|
|
|
|
|
+ dialogFormVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 关闭弹窗
|
|
|
|
|
+ const closeDialog = () => {
|
|
|
|
|
+ dialogFormVisible.value = false
|
|
|
|
|
+ formData.value = {
|
|
|
|
|
+ address: '',
|
|
|
|
|
+ image: '',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 弹窗确定
|
|
|
|
|
+ const enterDialog = async () => {
|
|
|
|
|
+ ElMessageBox.confirm('数据存盘?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ if(formData.value.sczl_rq==''){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: '请填写日期'
|
|
|
|
|
+ });
|
|
|
|
|
+ document.getElementById('日期').focus()
|
|
|
|
|
+ document.getElementById('日期').select()
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(formData.value.sczl_gdbh1=='' && formData.value.sczl_gdbh2=='' && formData.value.sczl_gdbh3=='' &&
|
|
|
|
|
+ formData.value.sczl_gdbh4=='' && formData.value.sczl_gdbh5=='' && formData.value.sczl_gdbh6==''){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: '请填写工单编号'
|
|
|
|
|
+ });
|
|
|
|
|
+ document.getElementById('sczl_gdbh1').focus()
|
|
|
|
|
+ document.getElementById('sczl_gdbh1').select()
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(parseFloat(formData.value.sczl_cl1)==0 && parseFloat(formData.value.sczl_cl2)==0 && parseFloat(formData.value.sczl_cl3)==0 &&
|
|
|
|
|
+ parseFloat(formData.value.sczl_cl4)==0 && parseFloat(formData.value.sczl_cl5)==0 && parseFloat(formData.value.sczl_cl6)==0){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: '请填写包装产量'
|
|
|
|
|
+ });
|
|
|
|
|
+ document.getElementById('sczl_cl1').focus()
|
|
|
|
|
+ document.getElementById('sczl_cl1').select()
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(parseFloat(formData.value.sczl_PgCl1)==0 && parseFloat(formData.value.sczl_PgCl2)==0 && parseFloat(formData.value.sczl_PgCl3)==0 &&
|
|
|
|
|
+ parseFloat(formData.value.sczl_PgCl4)==0 && parseFloat(formData.value.sczl_PgCl5)==0 && parseFloat(formData.value.sczl_PgCl6)==0){
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: '请填写每箱数量'
|
|
|
|
|
+ });
|
|
|
|
|
+ document.getElementById('sczl_PgCl1').focus()
|
|
|
|
|
+ document.getElementById('sczl_PgCl1').select()
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ updateDetailData()
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let lastCellValue=ref()
|
|
|
|
|
+ // 双击表格操作
|
|
|
|
|
+ function doubleClick(row) {
|
|
|
|
|
+ type.value = 'update';
|
|
|
|
|
+ getpickInfo(row['UniqId'])
|
|
|
|
|
+ dialogFormVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ // 单击表格操作
|
|
|
|
|
+ function Click(row, column, event) {
|
|
|
|
|
+ lastCellValue= row['UniqId'];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 导出excel
|
|
|
|
|
+ function exportExcel() {
|
|
|
|
|
+ console.log('导出到excel');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 生命周期钩子
|
|
|
|
|
+ onMounted(async () => {
|
|
|
|
|
+ });
|
|
|
|
|
+ </script>
|
|
|
|
|
+
|
|
|
|
|
+ <style>
|
|
|
|
|
+ .JKWTree-container {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .JKWTree-tree {
|
|
|
|
|
+ width: 300px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ padding: 10px;
|
|
|
|
|
+ margin-right: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .JKWTree-tree h3 {
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ margin: 10px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .JKWTree-content {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 选中某行时的背景色*/
|
|
|
|
|
+ .el-table__body tr.current-row>td {
|
|
|
|
|
+ background: #ff80ff !important;
|
|
|
|
|
+ /* 背景颜色 */
|
|
|
|
|
+ }
|
|
|
|
|
+ </style>
|
|
|
|
|
+ <style scoped>
|
|
|
|
|
+ :deep(.el-table td .cell) {
|
|
|
|
|
+ line-height: 20px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ :deep(.el-tabs__header){
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .search{
|
|
|
|
|
+ margin-left: 0px !important;
|
|
|
|
|
+ margin-right: 10px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .bt{
|
|
|
|
|
+ margin-left: 2px !important;
|
|
|
|
|
+ padding: 3px !important;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-tabs__header{
|
|
|
|
|
+ margin: 0px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .gva-table-box{
|
|
|
|
|
+ padding: 0px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .mab{
|
|
|
|
|
+ margin-bottom: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ /* tree组件背景高亮 */
|
|
|
|
|
+ :deep(.el-tree-node:focus > .el-tree-node__content){
|
|
|
|
|
+ background: #ff80ff !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ </style>
|