chukubaogong.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. <template>
  2. <div>
  3. <layout>
  4. <layout-header>
  5. <div class="">
  6. <!-- 按钮部分-->
  7. <el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
  8. <el-form-item>
  9. <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 180px;"></el-input>
  10. <el-button type="primary" icon="search" @click="onSubmit"
  11. style="margin: 0px 5px 0px 0px;width: 80px;height:40px;border-radius: 5%;">查询</el-button>
  12. <el-button type="primary" @click="onAttendance"
  13. style="margin: 0px 5px 0px 0px;width: 80px;height:40px;border-radius: 5%;">新增</el-button>
  14. <el-button type="primary" @click="baogong_del"
  15. style="margin: 0px 5px 0px 0px;width: 80px;height:40px;border-radius: 5%;float: right;background-color: red">删除</el-button>
  16. </el-form-item>
  17. </el-form>
  18. </div>
  19. </layout-header>
  20. <layout>
  21. <!--左侧树侧形结构-->
  22. <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
  23. <div class="JKWTree-tree" style="height: 200px">
  24. <h3>出库报工</h3>
  25. <el-tree :data="treeData" class="treecolor" @node-click="handleNodeClick"></el-tree>
  26. </div>
  27. </layout-sider>
  28. <!-- 右侧区域 -->
  29. <layout-content >
  30. <el-main>
  31. <div class="gva-table-box">
  32. <!-- 表格数据 -->
  33. <el-table ref="multipleTable" style="width: 100%;height: 65vh" tooltip-effect="dark"
  34. :row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
  35. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  36. :data="tableData" border row-key="ID"
  37. size="small"
  38. highlight-current-row="true" @row-dblclick="updateCompanyFunc"
  39. @row-click="tableRowClick" :show-overflow-tooltip="true"
  40. @selection-change="handleSelectionChange">
  41. <el-table-column type="selection" width="55" />
  42. <el-table-column sortable align="center" label="序号" prop="序号" width="100" />
  43. 1 <el-table-column sortable align="center" label="订单号" prop="订单号" width="150"/>
  44. <el-table-column sortable align="left" label="生产款号" prop="生产款号" width="150" />
  45. <el-table-column sortable align="left" label="款式" prop="款式" width="150" />
  46. <el-table-column sortable align="left" label="颜色" prop="颜色" width="150" />
  47. <el-table-column sortable align="left" label="工序" prop="工序" width="150" />
  48. <el-table-column sortable align="left" label="面料出库人" prop="面料出库人" width="150" />
  49. <el-table-column sortable align="left" label="日期" prop="日期" width="160" />
  50. </el-table>
  51. <!-- 分页 -->
  52. <div class="gva-pagination">
  53. <el-pagination layout="total" :current-page="page" :page-size="pageSize"
  54. :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
  55. <!-- <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]"-->
  56. <!-- :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />-->
  57. </div>
  58. </div>
  59. <!-- 修改弹窗 -->
  60. <el-dialog v-model="dialogFormVisible" :before-close="edit_closeDialog" destroy-on-close style="width: 60%; height: 70%;">
  61. <h1 style="margin: 0%;margin-bottom: 10px;">出库报工修改</h1>
  62. <el-row :gutter="24" style="margin-bottom: 20px;">
  63. <el-col :span="10">
  64. <el-form-item label="订单号:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
  65. <el-input v-model="edit_formData['订单号']" style="width: 70%; height: 40px;" id="订单号:" />
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="12">
  69. <el-form-item label="生产款号:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
  70. <el-input v-model="edit_formData['生产款号']" style="width: 70%; height: 40px;" id="生产款号" />
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. <el-row :gutter="24" style="margin-bottom: 20px;">
  75. <el-col :span="10">
  76. <el-form-item label="款式:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
  77. <el-input v-model="edit_formData['款式']" style="width: 70%; height: 40px;" id="款式" />
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="12">
  81. <el-form-item label="颜色:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
  82. <el-input v-model="edit_formData['颜色']" style="width: 70%; height: 40px;" id="颜色" />
  83. </el-form-item>
  84. </el-col>
  85. </el-row>
  86. <el-row :gutter="24" style="margin-bottom: 20px;">
  87. <el-col :span="10">
  88. <el-form-item label="工序:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
  89. <el-input v-model="edit_formData['工序']" style="width: 70%; height: 40px;" id="工序" />
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="12">
  93. <el-form-item label="面料出库人:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
  94. <el-input v-model="edit_formData['面料出库人']" style="width: 70%; height: 40px;" id="面料出库人" />
  95. </el-form-item>
  96. </el-col>
  97. </el-row>
  98. <el-row :gutter="24" style="margin-bottom: 20px;">
  99. <el-col :span="10">
  100. <el-form-item label="日期:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
  101. <el-input v-model="edit_formData['日期']" style="width: 70%; height: 40px;" id="日期" />
  102. </el-form-item>
  103. </el-col>
  104. </el-row>
  105. <template #footer>
  106. <div class="dialog-footer">
  107. <el-button @click="edit_closeDialog" style="width: 110px;height: 60px;font-size: 20px;">取消</el-button>
  108. <el-button type="primary" @click="edit_Dialog" style="width: 110px;height: 60px;font-size: 20px;">确认</el-button>
  109. </div>
  110. </template>
  111. </el-dialog>
  112. <!-- 新增弹窗 -->
  113. <el-dialog v-model="AttendanceVisible" destroy-on-close style="width: 100%;height: 100%;margin: 0px;">
  114. <h1 style="margin: 0%;margin-bottom: 10px;">新增</h1>
  115. <el-row :gutter="24" style="margin-bottom: 20px;">
  116. <el-input v-model="add_searchInfo" placeholder="扫描订单二维码获取订单信息"
  117. @keyup.enter="add_onSubmit"
  118. id="searchInput"
  119. style="width: 270px;margin: 5px;height: 50px;">
  120. </el-input>
  121. <el-button type="primary" icon="search" @click="add_onSubmit" style="margin: 5px;height: 50px;">查询</el-button>
  122. <el-form-item label="日期:" prop="deliveryDate" class="mab" label-width="100" style="font-size: 30px;margin: 10px;">
  123. <el-date-picker v-model="add_riqiformData['日期']" type="date" style="width: 150px;height: 40px;"/>
  124. </el-form-item>
  125. </el-row>
  126. <el-row :gutter="24" style="margin-bottom: 50px;">
  127. <el-table ref="multipleTable" style="width: 100%;height: 54vh" tooltip-effect="dark"
  128. :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px' }"
  129. :cell-style="{ padding: '10px' }" :header-row-style="{ height: '20px' }"
  130. :data="add_tableData" border row-key="ID"
  131. size="small" highlight-current-row="true" @row-dblclick="add_updateCompanyFunc"
  132. @row-click="add_tableRowClick" :show-overflow-tooltip="true"
  133. @selection-change="handleSelectionChange">
  134. <el-table-column sortable align="left" label="订单号" prop="订单号" width="270"/>
  135. <el-table-column sortable align="left" label="生产款号" prop="生产款号" width="305"/>
  136. <el-table-column sortable align="left" label="款式" prop="款式" width="270"/>
  137. <el-table-column sortable align="left" label="颜色" prop="颜色" width="270"/>
  138. </el-table>
  139. </el-row>
  140. <template #footer>
  141. <div class="dialog-footer">
  142. <el-button @click="add_closeDialog" style="width: 110px;height: 60px;font-size: 20px;">取消</el-button>
  143. <el-button type="primary" @click="add_Dialog" style="width: 110px;height: 60px;font-size: 20px;">确认出库</el-button>
  144. </div>
  145. </template>
  146. </el-dialog>
  147. </el-main>
  148. </layout-content>
  149. </layout>
  150. </layout>
  151. </div>
  152. </template>
  153. <script>
  154. export default {
  155. data() {
  156. return {
  157. dialogFormVisible: false,
  158. formDataTest: {
  159. imageUrl: '' // 添加一个字段来保存上传的图片路径
  160. },
  161. rule: {} // 初始化rule对象
  162. };
  163. },
  164. methods: {
  165. handleKeyDown(event, currentId, prevId, nextId) {
  166. const currentElement = document.getElementById(currentId);
  167. const isEmpty = currentElement.value === '';
  168. const atStart = currentElement.selectionStart === 0;
  169. const atEnd = currentElement.selectionStart === currentElement.value.length;
  170. switch (event.keyCode) {
  171. case 13: // Enter
  172. case 40: // 向下箭头
  173. if (nextId) {
  174. document.getElementById(nextId).focus();
  175. }
  176. break;
  177. case 38: // 向上箭头
  178. if (prevId) {
  179. document.getElementById(prevId).focus();
  180. }
  181. break;
  182. case 8: // 删除键
  183. if (prevId && (isEmpty || atStart)) {
  184. document.getElementById(prevId).focus();
  185. }
  186. break;
  187. case 37: // 向左箭头
  188. if (prevId && atStart) {
  189. document.getElementById(prevId).focus();
  190. }
  191. break;
  192. case 39: // 向右箭头
  193. if (nextId && atEnd) {
  194. document.getElementById(nextId).focus();
  195. }
  196. break;
  197. default:
  198. break;
  199. }
  200. },
  201. closeDialog() {
  202. // 关闭对话框的逻辑
  203. this.dialogFormVisible = false;
  204. },
  205. enterDialog() {
  206. // 确定按钮的逻辑
  207. // 在这里可以执行提交表单的逻辑
  208. },
  209. handleFileUpload(event) {
  210. // 处理文件上传逻辑
  211. const file = event.target.files[0];
  212. console.log(file)
  213. // 模拟上传并保存文件路径
  214. // 在实际应用中,您需要将文件上传到服务器并保存路径
  215. this.formDataTest.imageUrl = URL.createObjectURL(file);
  216. // 手动触发Vue的更新
  217. this.$forceUpdate();
  218. }
  219. }
  220. };
  221. </script>
  222. <script setup>
  223. // 全量引入格式化工具 请按需保留
  224. import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
  225. import {ref, reactive} from 'vue'
  226. import {getCustom, getDepartment, getProductData,getStaffInfo, getStaffList, ygjbzledit,clockUpdate} from '@/api/yunyin/yunying'
  227. import {ElMessage} from "element-plus";
  228. defineOptions({name: 'Company'})
  229. // =========== 获取左侧树侧形结构 ===========
  230. const treeData = ref({})
  231. const DataListdata = async () => {
  232. try {
  233. const data =
  234. [
  235. {label : '2024.7.16'},
  236. {label : '2024.7.15'},
  237. {label : '2024.7.14'},
  238. {label : '2024.7.13'},
  239. {label : '2024.7.12'},
  240. {label : '2024.7.11'}
  241. ];
  242. treeData.value = data
  243. } catch (error) {
  244. console.error(error);
  245. }
  246. };
  247. DataListdata();
  248. //点击左侧树形 获取右侧table列表
  249. const tableData = reactive([]);
  250. const _u8 = ref(null); // U8系统的值
  251. const _mes = ref(null); // MES系统的值
  252. const handleNodeClick = async (node) => {
  253. _getStaffList(); // 执行获取员工列表的函数
  254. };
  255. //点击管理中心 显示部门的全部数据
  256. const handleNodeExpand = async (node) => {
  257. // _department_code.value = node['编号'];
  258. searchInfo.value = '';
  259. _getStaffList()
  260. }
  261. // =========== 搜索 ===========
  262. const searchInfo = ref('')
  263. const _department_code = ref(null)
  264. //点击【查询】按钮
  265. const onSubmit = () => {
  266. _department_code.value = '';
  267. if(searchInfo.value === ''){
  268. tableData.length = 0;
  269. }else{
  270. _getStaffList();
  271. }
  272. };
  273. //获取员工信息列表
  274. const _getStaffList = async ()=>{
  275. console.log(123)
  276. try {
  277. const WorkListdata = [
  278. {
  279. '序号':'1',
  280. '订单号':'2408001',
  281. '生产款号':'2403-1622款',
  282. '款式':'连衣裙',
  283. '颜色':'红色',
  284. '工序':'仓库出库',
  285. '面料验片人':'xxx',
  286. '日期':'2024-07-16'
  287. },
  288. {
  289. '序号':'2',
  290. '订单号':'2408002',
  291. '生产款号':'2403-1622款',
  292. '款式':'裤子',
  293. '颜色':'蓝色',
  294. '工序':'仓库出库',
  295. '面料验片人':'xxx',
  296. '日期':'2024-07-16'
  297. },
  298. {
  299. '序号':'3',
  300. '订单号':'2408003',
  301. '生产款号':'2403-1622款',
  302. '款式':'西服',
  303. '颜色':'黑色 ',
  304. '工序':'仓库出库',
  305. '面料验片人':'xxx',
  306. '日期':'2024-07-16'
  307. },
  308. ];
  309. console.log(WorkListdata)
  310. tableData.splice(0,tableData.length,...WorkListdata);//表格数据
  311. // total.value =WorkListdata.data.total;//共多少条
  312. } catch (error) {
  313. console.error(error);
  314. }
  315. }
  316. // =========== 新增按钮 ===========
  317. const AttendanceVisible=ref(false)
  318. const add_tableData = reactive([]);
  319. // 获取当前日期
  320. const today = new Date();
  321. const year = today.getFullYear();
  322. const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
  323. const day = String(today.getDate()).padStart(2, '0');
  324. const hours = String(today.getHours()).padStart(2, '0');
  325. const minutes = String(today.getMinutes()).padStart(2, '0');
  326. const seconds = String(today.getSeconds()).padStart(2, '0');
  327. const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  328. //新增按钮
  329. const onAttendance = () => {
  330. AttendanceVisible.value=true
  331. setTimeout(() => {
  332. const inputElement = document.querySelector('#searchInput');
  333. if (inputElement) {
  334. inputElement.focus();
  335. }
  336. }, 100); // 延迟100毫秒
  337. add_riqiformData['日期'] = currentDate
  338. };
  339. const add_riqiformData = reactive({
  340. 日期: '',
  341. });
  342. // 新增确定
  343. const add_Dialog = () => {
  344. AttendanceVisible.value = false
  345. };
  346. // 新增取消
  347. const add_closeDialog = () => {
  348. AttendanceVisible.value = false
  349. };
  350. // =========== 新增搜索 ===========
  351. const add_searchInfo = ref('')
  352. //点击【查询】按钮
  353. const add_onSubmit = async ()=>{
  354. if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
  355. const WorkListdata = [];
  356. add_tableData.splice(0,add_tableData.length,...WorkListdata);
  357. ElMessage({type: 'warning',message: '搜索内容不能为空' })
  358. }else{
  359. console.log(add_searchInfo.value)
  360. if(add_searchInfo.value === '2408001'){
  361. const WorkListdata = [
  362. {
  363. '订单子编号':'2408001-1',
  364. '订单号':'2408001',
  365. '生产款号':'2401-1622款',
  366. '款式':'连衣裙',
  367. '颜色':'红色'
  368. },
  369. {
  370. '订单子编号':'2408001-2',
  371. '订单号':'2408001',
  372. '生产款号':'2401-1623款',
  373. '款式':'长袖',
  374. '颜色':'蓝色'
  375. },
  376. ];
  377. add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
  378. }else if(add_searchInfo.value === '2408002'){
  379. const WorkListdata = [
  380. {
  381. '订单子编号':'2408002-2',
  382. '订单号':'2408002',
  383. '生产款号':'2402-1624款',
  384. '款式':'西服',
  385. '颜色':'白色'
  386. },
  387. ];
  388. add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
  389. }else if(add_searchInfo.value === '2408003'){
  390. const WorkListdata = [
  391. {
  392. '订单子编号':'2408003-3',
  393. '订单号':'2408003',
  394. '生产款号':'2403-1625款',
  395. '款式':'西服',
  396. '颜色':'白色'
  397. },
  398. ];
  399. add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
  400. }
  401. add_searchInfo.value = '';
  402. setTimeout(() => {
  403. const inputElement = document.querySelector('#searchInput');
  404. if (inputElement) {
  405. inputElement.focus();
  406. }
  407. }, 100); // 延迟100毫秒
  408. }
  409. };
  410. // =========== 删除按钮 ===========
  411. const bgSelection = ref(null)
  412. const baogong_del = () => {
  413. if(bgSelection.value === null || bgSelection.value === ''){
  414. ElMessage({type: 'warning',message: '请选择删除的数据' })
  415. }else{
  416. console.log(bgSelection.value)
  417. }
  418. }
  419. // 复选框
  420. const handleSelectionChange = (selection, type) => {
  421. const ids = selection.map(item => {
  422. return item.订单子编号
  423. })
  424. bgSelection.value = ids.join(',')
  425. }
  426. // =========== 修改 ===========
  427. const dialogFormVisible = ref(false)
  428. const edit_formData = ref({})
  429. // 双击修改
  430. const updateCompanyFunc = async (row) => {
  431. console.log(row)
  432. dialogFormVisible.value = true;
  433. Object.assign(edit_formData.value,row);
  434. };
  435. // 修改确认
  436. const edit_Dialog = async (row) => {
  437. dialogFormVisible.value = false;
  438. };
  439. // 修改取消
  440. const edit_closeDialog = async (row) => {
  441. dialogFormVisible.value = false;
  442. };
  443. // =========== 分页 ===========
  444. // 分页相关的响应式变量
  445. const page = ref(1)
  446. const total = ref(0)
  447. const pageSize = ref(10)
  448. // 分页
  449. const handleCurrentChange = (val) => {
  450. page.value = val;
  451. _getStaffList();
  452. };
  453. // 修改页面容量 点击多少条/页
  454. const handleSizeChange = (val) => {
  455. page.value = 10;//默认显示
  456. pageSize.value = val;
  457. _getStaffList();
  458. };
  459. //修改
  460. const formDataTest = ref({})
  461. const Attendancevalue = ref({})
  462. //考勤建立弹窗确定
  463. const AttendanceDialog = async () => {
  464. _clockUpdate()
  465. }
  466. //设置法定天数
  467. const _clockUpdate = async ()=>{
  468. const formattedData = {
  469. month:Attendancevalue.value['month'],
  470. number:Attendancevalue.value['day'],
  471. typeA:Attendancevalue.value['typeA'],
  472. typeB:Attendancevalue.value['typeB'],
  473. typeC:Attendancevalue.value['typeC'],
  474. sys_id:'[1010/郑梅芳]'
  475. };
  476. console.log(formattedData)
  477. const response = await clockUpdate(formattedData);
  478. if (response.code === 0) {
  479. ElMessage({
  480. type: 'success',
  481. message: '成功'
  482. })
  483. AttendanceVisible.value=false
  484. }else{
  485. ElMessage({
  486. type: 'error',
  487. message: '失败'
  488. })
  489. }
  490. }
  491. //获取小时数
  492. const getdays = () => {
  493. console.log(Attendancevalue.value['day'])
  494. if(Attendancevalue.value['day']!=''){
  495. Attendancevalue.value['typeA']=Attendancevalue.value['day']*7.5
  496. Attendancevalue.value['typeB']=Attendancevalue.value['day']*8
  497. Attendancevalue.value['typeC']=Attendancevalue.value['day']*8
  498. }else{
  499. ElMessage({
  500. type: 'error',
  501. message: '请输入法定天数'
  502. })
  503. }
  504. }
  505. // 修改关闭弹窗
  506. const closeDialog = () => {dialogFormVisible.value = false,AttendanceVisible.value=false}
  507. // 弹窗确定
  508. const enterDialog = async () => {
  509. console.log(formDataTest.value['出生日期'])
  510. if(formDataTest.value['出生日期'] === '' || formDataTest.value['出生日期'] === null){
  511. ElMessage({
  512. type: 'error',
  513. message: '出生日期不能为空'
  514. })
  515. return false;
  516. }
  517. if(formDataTest.value['身份证号'] === '' || formDataTest.value['身份证号'] === null){
  518. ElMessage({
  519. type: 'error',
  520. message: '身份证号不能为空'
  521. })
  522. return false;
  523. }
  524. _ygjbzledit();
  525. }
  526. //修改员工资料
  527. const _ygjbzledit = async ()=>{
  528. const formattedData = {
  529. '员工编号': formDataTest.value['员工编号'],
  530. '员工姓名': formDataTest.value['员工姓名'],
  531. '性别': formDataTest.value['性别'],
  532. '出生日期': formDataTest.value['出生日期'],
  533. '身份证号': formDataTest.value['身份证号'],
  534. '职称职务': formDataTest.value['职称职务'],
  535. '所在部门': formDataTest.value['所在部门'],
  536. '聘用日期': formDataTest.value['聘用日期'],
  537. '转正日期': formDataTest.value['转正日期'],
  538. '扣减司龄': formDataTest.value['扣减司龄'] ? formDataTest.value['扣减司龄'] : '0',
  539. '人员类别': formDataTest.value['人员类别'],
  540. '人员性质': formDataTest.value['人员性质'],
  541. '班次类型': formDataTest.value['班次类型'],
  542. '薪酬核算分组': formDataTest.value['薪酬核算分组'],
  543. '工资表类别': formDataTest.value['工资表类别'],
  544. 'U8在职': formDataTest.value['U8在职'],
  545. '在职状态': formDataTest.value['在职状态'],
  546. '部门编码': formDataTest.value['部门编码'],
  547. };
  548. try {
  549. const ygjbzledit_eddt = await ygjbzledit(formattedData);
  550. if (ygjbzledit_eddt .code === 0) {
  551. dialogFormVisible.value = false;
  552. ElMessage({type: 'success',message: '更新成功'})
  553. } else {
  554. console.log(ygjbzledit_eddt);
  555. ElMessage({ type: 'error',message: '更新失败'})
  556. }
  557. } catch (error) {
  558. console.error(error);
  559. }
  560. }
  561. </script>
  562. <style scoped>
  563. .form-container {
  564. display: flex;
  565. flex-wrap: wrap;
  566. }
  567. .form-column {
  568. /*flex: 1;*/
  569. margin-right: 15px; /* 调整列之间的间距 */
  570. }
  571. /* 左侧输入框宽度调整 */
  572. .form-column .el-form-item .el-input {
  573. width: 150px; /* 调整左侧输入框的宽度 */
  574. }
  575. /* 媒体查询,根据需要调整断点 */
  576. @media screen and (max-width: 768px) {
  577. .form-column {
  578. flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
  579. margin-right: 0;
  580. }
  581. }
  582. /*:deep(.el-table td .cell) {*/
  583. /* line-height: 30px !important;*/
  584. /*}*/
  585. .JKWTree-container {
  586. display: flex;
  587. }
  588. .JKWTree-tree {
  589. /*width: 300px;*/
  590. background-color: #fff;
  591. padding: 10px;
  592. margin-right: 20px;
  593. }
  594. .JKWTree-tree h3 {
  595. font-size: 15px;
  596. font-weight: 700;
  597. margin: 10px 0;
  598. }
  599. .JKWTree-content {
  600. flex: 1;
  601. }
  602. /* 图片上传 */
  603. .upload-box {
  604. width: 200px;
  605. height: 200px;
  606. border: 2px dashed #e2e2e2;
  607. display: flex;
  608. justify-content: center;
  609. align-items: center;
  610. position: relative;
  611. cursor: pointer;
  612. }
  613. .uploaded-image {
  614. width: 100%;
  615. height: 100%;
  616. object-fit: cover;
  617. }
  618. .upload-icon {
  619. font-size: 40px;
  620. color: #c0c4cc;
  621. }
  622. .file-input {
  623. display: none;
  624. }
  625. .el-table .warning-row {
  626. background: oldlace;
  627. }
  628. /* 选中某行时的背景色 */
  629. :deep(.el-table__body tr.current-row) > td {
  630. background: #ff80ff !important;
  631. }
  632. </style>
  633. <style scoped>
  634. :deep(.el-table td .cell) {
  635. line-height: 20px !important;
  636. }
  637. :deep(.el-tabs__header){
  638. margin-bottom: 0;
  639. }
  640. .search{
  641. margin-left: 0px !important;
  642. margin-right: 10px !important;
  643. }
  644. .bt{
  645. margin-left: 2px !important;
  646. padding: 3px !important;
  647. font-size: 12px;
  648. }
  649. .el-tabs__header{
  650. margin: 0px !important;
  651. }
  652. .gva-table-box{
  653. padding: 0px !important;
  654. }
  655. .mab{
  656. margin-bottom: 5px;
  657. }
  658. </style>