yangyipihe.vue 13 KB

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