yuedudahuoshengchanjindu.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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" >查询</el-button>
  11. <!-- <el-button type="primary" icon="edit" @click="gd_gxclhconClick" class="bt" title="修改">修改</el-button> -->
  12. </el-form-item>
  13. </el-form>
  14. </div>
  15. </layout-header>
  16. <layout>
  17. <!-- 左侧树侧形结构-->
  18. <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
  19. <div class="JKWTree-tree" style="height: 200px">
  20. <h3>选择月份</h3>
  21. <!-- <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand"> -->
  22. <el-tree :data="treeData" @node-click="handleNodeClick" class="treecolor">
  23. </el-tree>
  24. </div>
  25. </layout-sider>
  26. <!-- 右侧区域 -->
  27. <layout-content >
  28. <el-main>
  29. <div class="gva-table-box">
  30. <!-- 表格数据 -->
  31. <el-table ref="multipleTable" style="width: 100%;height: 65vh" tooltip-effect="dark"
  32. :row-style="{ height: '25px' }" :header-cell-style="{ padding: '0px' }"
  33. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  34. :data="tableData" border row-key="ID"
  35. size="small"
  36. :cell-class-name="gxbgCellClass"
  37. highlight-current-row="true" @row-dblclick="updateCompanyFunc"
  38. @row-click="tableRowClick" :show-overflow-tooltip="true"
  39. @selection-change="handleSelectionChange">
  40. <el-table-column sortable align="center" label="序号" prop="序号" width="80" />
  41. <el-table-column sortable align="center" label="款式" prop="款式" width="120" />
  42. <el-table-column sortable align="center" label="客户编号" prop="客户编号" width="100" />
  43. <el-table-column sortable align="center" label="下单日期" prop="下单日期" width="100" />
  44. <el-table-column sortable align="center" label="客户确认货期" prop="客户确认货期" width="130" />
  45. <el-table-column sortable align="center" label="款号" prop="款号" width="80" />
  46. <el-table-column sortable align="center" label="生产组别" prop="生产组别" width="100" />
  47. <el-table-column sortable align="center" label="订单数量" prop="订单数量" width="100" />
  48. <el-table-column sortable align="center" label="实裁数量" prop="实裁数量" width="100" />
  49. <el-table-column sortable align="center" label="已完成数量" prop="已完成数量" width="120" />
  50. <el-table-column sortable align="center" label="入库数量" prop="入库数量" width="100" />
  51. <el-table-column sortable align="center" label="面料入库时间" prop="面料入库时间" width="130" />
  52. <el-table-column sortable align="center" label="辅料入库时间" prop="辅料入库时间" width="130" />
  53. <el-table-column sortable align="center" label="产前样批核" prop="产前样批核" width="120" />
  54. <el-table-column sortable align="center" label="大货制单" prop="大货制单" width="100" />
  55. <el-table-column sortable align="center" label="工装模板" prop="工装模板" width="100" />
  56. <el-table-column sortable align="center" label="开裁日期" prop="开裁日期" width="100" />
  57. <el-table-column sortable align="center" label="上车位时间" prop="上车位时间" width="120" />
  58. <el-table-column sortable align="center" label="台产" prop="台产" width="80" />
  59. <el-table-column sortable align="center" label="车位完成时间" prop="车位完成时间" width="160" />
  60. <el-table-column sortable align="center" label="后道完成时间" prop="后道完成时间" width="160" />
  61. <el-table-column sortable align="center" label="备注" prop="备注" width="150" />
  62. </el-table>
  63. <!-- 分页 -->
  64. <div class="gva-pagination">
  65. <el-pagination layout="total" :current-page="page" :page-size="pageSize"
  66. :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
  67. <!-- <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]"-->
  68. <!-- :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />-->
  69. </div>
  70. </div>
  71. </el-main>
  72. </layout-content>
  73. </layout>
  74. </layout>
  75. </div>
  76. </template>
  77. <script setup>
  78. // 全量引入格式化工具 请按需保留
  79. import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
  80. import {ref, reactive} from 'vue'
  81. import {dateList,OrderYieldList} from '@/api/mes/job'
  82. import PrintPage from './components/print.vue'
  83. import {ElMessage} from "element-plus";
  84. defineOptions({name: 'Company'})
  85. // =========== 获取左侧树侧形结构 ===========
  86. const treeData = ref([]);
  87. const _department_code = ref(null)
  88. const getDepartmentdata = async () => {
  89. try {
  90. const dateList_list = await dateList();
  91. const { data } = dateList_list;
  92. treeData.value = data.map(month => ({label: month })); // 假设每个节点有一个id和label
  93. console.log(553, treeData.value);
  94. } catch (error) {
  95. console.error(error);
  96. }
  97. };
  98. getDepartmentdata();
  99. //点击左侧树形 获取右侧table列表
  100. const tableData = reactive([]);
  101. const _code = ref(null); //左侧菜单编号
  102. const handleNodeClick = async (node) => {
  103. console.log(778,node)
  104. // 取消所有节点的颜色
  105. const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
  106. allNodes.forEach(node => {
  107. node.querySelector('.el-tree-node__label').style.color = '';
  108. });
  109. // 获取点击的节点
  110. const clickedNodeId = node['$treeNodeId'];
  111. const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
  112. if (clickedNode) {
  113. // 给当前点击的节点改变颜色
  114. clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
  115. }
  116. searchInfo.value = ''; // 清空搜索信息
  117. _workOrderDetailList(); // 执行获取员工列表的函数
  118. };
  119. //全局调用工单编号
  120. const _Gd_gdbh = ref(null)
  121. //全局调用印件代号
  122. const _Gd_cpdh = ref(null)
  123. const tableRowClick = async (row) => {
  124. console.log(row.工单编号)
  125. _Gd_gdbh.value = row.工单编号;
  126. _Gd_yjdh.value = row.印件代号;
  127. };
  128. // 搜索默认为空
  129. const searchInfo = ref('')
  130. //点击【查询】按钮
  131. const onSubmit = () => {
  132. _department_code.value = '';
  133. if(searchInfo.value === ''){
  134. tableData.length = 0;
  135. }else{
  136. _code.value = '';
  137. console.log(searchInfo.value)
  138. _workOrderDetailList();
  139. }
  140. };
  141. //获取员工信息列表
  142. const _workOrderDetailList = async ()=>{
  143. const OrderYieldListtable = await OrderYieldList();
  144. console.log(456,OrderYieldListtable)
  145. try {
  146. const workOrderDetaildata =
  147. console.log(workOrderDetaildata)
  148. tableData.splice(0,tableData.length,...workOrderDetaildata);
  149. } catch (error) {
  150. console.error(error);
  151. }
  152. }
  153. // 分页相关的响应式变量
  154. const page = ref(1)
  155. const total = ref(0)
  156. const pageSize = ref(10)
  157. // 分页
  158. const handleCurrentChange = (val) => {
  159. page.value = val;
  160. _getStaffList();
  161. };
  162. // 修改页面容量 点击多少条/页
  163. const handleSizeChange = (val) => {
  164. page.value = 10;//默认显示
  165. pageSize.value = val;
  166. _getStaffList();
  167. };
  168. // 弹窗控制标记
  169. const dialogFormVisible = ref(false)
  170. //修改
  171. const formDataTest = ref({})
  172. </script>
  173. <style scoped>
  174. .form-container {
  175. display: flex;
  176. flex-wrap: wrap;
  177. }
  178. .form-column {
  179. /*flex: 1;*/
  180. margin-right: 15px; /* 调整列之间的间距 */
  181. }
  182. /* 左侧输入框宽度调整 */
  183. .form-column .el-form-item .el-input {
  184. width: 150px; /* 调整左侧输入框的宽度 */
  185. }
  186. :deep(.hui-plan-usage-lows div) {
  187. color: #8c939d !important;
  188. }
  189. :deep(.lan-plan-usage-lows div) {
  190. color: blue !important;
  191. font-weight: bold;
  192. }
  193. /* :deep(.hui-plan-usage-lows.column-0 div) {
  194. color: #8c939d !important;
  195. }
  196. :deep(.hui-plan-usage-lows.column-1 div) {
  197. color: #8c939d !important;
  198. }
  199. :deep(.hui-plan-usage-lows.column-2 div) {
  200. color: #8c939d !important;
  201. }
  202. :deep(.hui-plan-usage-lows.column-3 div) {
  203. color: #8c939d !important;
  204. }
  205. :deep(.hui-plan-usage-lows.column-4 div) {
  206. color: #8c939d !important;
  207. }
  208. :deep(.hui-plan-usage-lows.column-5 div) {
  209. color: #8c939d !important;
  210. }
  211. :deep(.hui-plan-usage-lows.column-6 div) {
  212. color: #8c939d !important;
  213. }
  214. :deep(.hui-plan-usage-lows.column-7 div) {
  215. color: #8c939d !important;
  216. }
  217. :deep(.hui-plan-usage-lows.column-8 div) {
  218. color: #8c939d !important;
  219. }
  220. :deep(.hui-plan-usage-lows.column-9 div) {
  221. color: #8c939d !important;
  222. }
  223. :deep(.hui-plan-usage-lows.column-10 div) {
  224. color: #8c939d !important;
  225. }
  226. :deep(.hui-plan-usage-lows.column-11 div) {
  227. color: #8c939d !important;
  228. }
  229. :deep(.hui-plan-usage-lows.column-12 div) {
  230. color: #8c939d !important;
  231. }
  232. :deep(.hui-plan-usage-lows.column-13 div) {
  233. color: #8c939d !important;
  234. }
  235. :deep(.hui-plan-usage-lows.column-14 div) {
  236. color: #8c939d !important;
  237. }
  238. :deep(.hui-plan-usage-lows.column-15 div) {
  239. color: #8c939d !important;
  240. }
  241. :deep(.hui-plan-usage-lows.column-16 div) {
  242. color: #8c939d !important;
  243. }
  244. :deep(.hui-plan-usage-lows.column-17 div) {
  245. color: #8c939d !important;
  246. }
  247. :deep(.lan-plan-usage-lows.column-0 div) {
  248. color: blue !important;
  249. font-weight: bold;
  250. }
  251. :deep(.lan-plan-usage-lows.column-1 div) {
  252. color: blue !important;
  253. font-weight: bold;
  254. }
  255. :deep(.lan-plan-usage-lows.column-2 div) {
  256. color: blue !important;
  257. font-weight: bold;
  258. }
  259. :deep(.lan-plan-usage-lows.column-3 div) {
  260. color: blue !important;
  261. font-weight: bold;
  262. }
  263. :deep(.lan-plan-usage-lows.column-4 div) {
  264. color: blue !important;
  265. font-weight: bold;
  266. }
  267. :deep(.lan-plan-usage-lows.column-5 div) {
  268. color: blue !important;
  269. font-weight: bold;
  270. }
  271. :deep(.lan-plan-usage-lows.column-6 div) {
  272. color: blue !important;
  273. font-weight: bold;
  274. }
  275. :deep(.lan-plan-usage-lows.column-7 div) {
  276. color: blue !important;
  277. font-weight: bold;
  278. }
  279. :deep(.lan-plan-usage-lows.column-8 div) {
  280. color: blue !important;
  281. font-weight: bold;
  282. }
  283. :deep(.lan-plan-usage-lows.column-9 div) {
  284. color: blue !important;
  285. font-weight: bold;
  286. }
  287. :deep(.lan-plan-usage-lows.column-10 div) {
  288. color: blue !important;
  289. font-weight: bold;
  290. }
  291. :deep(.lan-plan-usage-lows.column-11 div) {
  292. color: blue !important;
  293. font-weight: bold;
  294. }
  295. :deep(.lan-plan-usage-lows.column-12 div) {
  296. color: blue !important;
  297. font-weight: bold;
  298. }
  299. :deep(.lan-plan-usage-lows.column-13 div) {
  300. color: blue !important;
  301. font-weight: bold;
  302. }
  303. :deep(.lan-plan-usage-lows.column-14 div) {
  304. color: blue !important;
  305. font-weight: bold;
  306. }
  307. :deep(.lan-plan-usage-lows.column-15 div) {
  308. color: blue !important;
  309. font-weight: bold;
  310. }
  311. :deep(.lan-plan-usage-lows.column-16 div) {
  312. color: blue !important;
  313. font-weight: bold;
  314. }
  315. :deep(.lan-plan-usage-lows.column-17 div) {
  316. color: blue !important;
  317. font-weight: bold;
  318. } */
  319. /* 媒体查询,根据需要调整断点 */
  320. @media screen and (max-width: 768px) {
  321. .form-column {
  322. flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
  323. margin-right: 0;
  324. }
  325. }
  326. /*:deep(.el-table td .cell) {*/
  327. /* line-height: 30px !important;*/
  328. /*}*/
  329. .JKWTree-container {
  330. display: flex;
  331. }
  332. .JKWTree-tree {
  333. /*width: 300px;*/
  334. background-color: #fff;
  335. padding: 10px;
  336. margin-right: 20px;
  337. }
  338. .JKWTree-tree h3 {
  339. font-size: 15px;
  340. font-weight: 700;
  341. margin: 10px 0;
  342. }
  343. .JKWTree-content {
  344. flex: 1;
  345. }
  346. /* 图片上传 */
  347. .upload-box {
  348. width: 200px;
  349. height: 200px;
  350. border: 2px dashed #e2e2e2;
  351. display: flex;
  352. justify-content: center;
  353. align-items: center;
  354. position: relative;
  355. cursor: pointer;
  356. }
  357. .uploaded-image {
  358. width: 100%;
  359. height: 100%;
  360. object-fit: cover;
  361. }
  362. .upload-icon {
  363. font-size: 40px;
  364. color: #c0c4cc;
  365. }
  366. .file-input {
  367. display: none;
  368. }
  369. .el-table .warning-row {
  370. background: oldlace;
  371. }
  372. /* 选中某行时的背景色 */
  373. :deep(.el-table__body tr.current-row) > td {
  374. background: #ff80ff !important;
  375. }
  376. </style>
  377. <style scoped>
  378. :deep(.el-table td .cell) {
  379. line-height: 20px !important;
  380. }
  381. :deep(.el-tabs__header){
  382. margin-bottom: 0;
  383. }
  384. .search{
  385. margin-left: 0px !important;
  386. margin-right: 10px !important;
  387. }
  388. .bt{
  389. margin-left: 2px !important;
  390. padding: 3px !important;
  391. font-size: 12px;
  392. }
  393. .el-tabs__header{
  394. margin: 0px !important;
  395. }
  396. .gva-table-box{
  397. padding: 0px !important;
  398. }
  399. .mab{
  400. margin-bottom: 5px;
  401. }
  402. </style>