You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2577 lines
85 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <div class="customer-css" >
  3. <!-- 菜单按钮区域 -->
  4. <fieldset class="customer-field" style="width: 612px; padding: 0.35em 0.75em 0.425em;" >
  5. <legend>菜单</legend>
  6. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -2px;" >
  7. <el-form-item :label="''">
  8. <el-button class="customer-bun-min" type="primary" style="margin-left: 10px; margin-bottom: 5px;">关闭</el-button>
  9. </el-form-item>
  10. <el-form-item :label="''">
  11. <el-button class="customer-bun-min" type="primary" @click="refreshPageTables" style="margin-left: 10px; margin-bottom: 5px;">刷新</el-button>
  12. </el-form-item>
  13. <el-form-item :label="''">
  14. <el-button class="customer-bun-min" type="primary" @click="moveUpScheduleBun" style="margin-left: 10px; margin-bottom: 5px;">上移</el-button>
  15. </el-form-item>
  16. <el-form-item :label="''">
  17. <el-button class="customer-bun-min" type="primary" @click="moveDownScheduleBun" style="margin-left: 10px; margin-bottom: 5px;">下移</el-button>
  18. </el-form-item>
  19. </el-form>
  20. </fieldset>
  21. <!-- 排序规则 -->
  22. <fieldset class="customer-field" style="margin-left: 640px; margin-top: -45px; width: 135px;" >
  23. <legend>排序</legend><br>
  24. <el-form :inline="true" style="margin-top: -10px; margin-bottom: 15px;" label-position="top" label-width="100px" >
  25. <el-form-item :label="''" style="margin-bottom: 5px;">
  26. <el-radio-group v-model="pageData.sortField">
  27. <el-radio label="needDate">要求完工日期</el-radio>
  28. <el-radio label="orderNo">订单号</el-radio>
  29. <el-radio label="partNo">产品编码</el-radio>
  30. </el-radio-group>
  31. </el-form-item>
  32. </el-form>
  33. </fieldset>
  34. <!-- 查询时间和产品 -->
  35. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -15px;" >
  36. <el-form-item :label="'录入日期:'">
  37. <el-date-picker class="el-time-width"
  38. style=""
  39. v-model="pageData.enterTime1"
  40. value-format="yyyy-MM-dd">
  41. </el-date-picker>
  42. </el-form-item>
  43. <el-form-item :label="''" style="margin-top: -10px;">
  44. <el-date-picker class="el-time-width"
  45. style="margin-top: 30px;"
  46. v-model="pageData.enterTime2"
  47. value-format="yyyy-MM-dd" placeholder="">
  48. </el-date-picker>
  49. </el-form-item>
  50. <el-form-item :label="'要求完工日期:'">
  51. <el-date-picker class="el-time-width"
  52. style=""
  53. v-model="pageData.needTime1"
  54. value-format="yyyy-MM-dd" placeholder="">
  55. </el-date-picker>
  56. </el-form-item>
  57. <el-form-item :label="''" style="margin-top: -10px;">
  58. <el-date-picker class="el-time-width"
  59. style="margin-top: 30px;"
  60. v-model="pageData.needTime2"
  61. value-format="yyyy-MM-dd" placeholder="">
  62. </el-date-picker>
  63. </el-form-item>
  64. <el-form-item :label="'产成品编码:'">
  65. <el-input v-model="pageData.partNo" style="width: 120px"></el-input>
  66. </el-form-item>
  67. </el-form>
  68. <!-- 排产信息 -->
  69. <fieldset class="customer-field" style="margin-top: 10px; width: 612px; padding: 0.125em;" >
  70. <legend>排产信息</legend>
  71. <!-- 排产日期 -->
  72. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  73. <el-form-item :label="'排产日期:'">
  74. <el-date-picker class="el-time-width"
  75. style=""
  76. v-model="pageData.scheduleDate"
  77. value-format="yyyy-MM-dd">
  78. </el-date-picker>
  79. </el-form-item>
  80. <el-form-item :label="''" style="margin-top: -10px;">
  81. <el-checkbox v-model="pageData.specifiedTime" true-label="Y" false-label="N" style="margin-top: 28px; margin-right: -20px;" ></el-checkbox>
  82. <el-time-picker
  83. format="HH:mm"
  84. arrow-control
  85. style="margin-top: 30px; width: 65px"
  86. v-model="pageData.scheduleTime"
  87. value-format="HH:mm">
  88. </el-time-picker>
  89. </el-form-item>
  90. <el-form-item :label="''" style="margin-top: -10px; margin-left: -5px;">
  91. <el-checkbox style="margin-top: 28px;" label="仅查看前道工序已排产的工序" name="type"></el-checkbox>
  92. </el-form-item>
  93. </el-form>
  94. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 10px;">
  95. <el-form-item :label="'工厂编号:'">
  96. <el-input v-model="pageData.site" style="width: 85px"></el-input>
  97. </el-form-item>
  98. <el-form-item>
  99. <span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span>
  100. <el-input v-model="pageData.resourceId" @blur="getCurrentWorkCenterNoByResourceId" style="width: 120px"></el-input>
  101. </el-form-item>
  102. <el-form-item :label="'加工中心编码:'">
  103. <el-input v-model="pageData.workCenterNo" readonly="readonly" style="width: 120px"></el-input>
  104. </el-form-item>
  105. </el-form>
  106. <!-- 记录示意图 -->
  107. <fieldset style="margin-left: 380px; margin-top: -88px; width: 180px;">
  108. <legend>记录示意图</legend>
  109. <el-form :inline="true" label-position="top" label-width="100px" class="customer-card">
  110. <el-form-item :label="'已关闭,已达数量'">
  111. <el-card class="customer-el-card customer-el-card-pink"></el-card>
  112. </el-form-item>
  113. <el-form-item :label="'已关闭,未达数量'">
  114. <el-card class="customer-el-card customer-el-card-orange"></el-card>
  115. </el-form-item>
  116. <el-form-item :label="'未关闭,未达数量'">
  117. <el-card class="customer-el-card customer-el-card-blue"></el-card>
  118. </el-form-item>
  119. </el-form>
  120. </fieldset>
  121. <!-- 等待订单 -->
  122. <fieldset style="margin-left: 585px; margin-top: -93px; width: 180px; margin-bottom: 5px;">
  123. <legend>等待订单</legend>
  124. <el-form :inline="true" label-position="left" label-width="100px" class="customer-border">
  125. <el-form-item :label="'等待时间(分钟):'" >
  126. <el-input type="number" v-model="pageData.waitTimes"
  127. style="margin-top: 3px; width: 48px;">
  128. </el-input>
  129. </el-form-item>
  130. <el-form-item :label="''" style="text-align: center; margin-top: 15px; margin-bottom: 9px;">
  131. <el-button type="primary" @click="addWaitScheduleBun" style="margin-left: 30px; margin-top: 10px; margin-bottom: 15px;">插入等待订单</el-button>
  132. </el-form-item>
  133. </el-form>
  134. </fieldset>
  135. </fieldset >
  136. <!-- 机台班次信息 -->
  137. <el-main style="margin-left: 770px; margin-top: -255px; width: 452px;">
  138. <el-table
  139. height="235"
  140. :data="resourceShiftList"
  141. border
  142. v-loading="dataListLoading"
  143. style="width: 100%;">
  144. <el-table-column
  145. v-for="(item,index) in columnTimeArray" :key="index"
  146. :sortable="item.columnSortable"
  147. :prop="item.columnProp"
  148. :header-align="item.headerAlign"
  149. :show-overflow-tooltip="item.showOverflowTooltip"
  150. :align="item.align"
  151. :fixed="item.fixed"
  152. :width="item.columnWidth"
  153. :label="item.columnLabel">
  154. <template slot-scope="scope">
  155. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  156. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  157. style="width: 100px; height: 80px"/></span>
  158. </template>
  159. </el-table-column>
  160. </el-table>
  161. </el-main>
  162. <!-- 工单主表信息 -->
  163. <el-main style="margin-left: -20px; margin-top: -35px; width: 104%;">
  164. <el-form :inline="true" label-position="top" label-width="100px">
  165. <el-form-item :label="'主记录'">
  166. </el-form-item>
  167. <el-dropdown class="customer-dropdown" size="mini" @command="orderHandleCommand">
  168. <el-button type="primary" @click="controlPrimaryMenuBun">
  169. 主菜单<i class="el-icon-arrow-down el-icon--right"></i>
  170. </el-button>
  171. <el-dropdown-menu slot="dropdown">
  172. <el-dropdown-item class="customer-li" command="生产工单"
  173. :disabled="primaryMenuButton.shopOrderFlag">生产订单</el-dropdown-item>
  174. <el-dropdown-item class="customer-li" command="工作日历"
  175. :disabled="primaryMenuButton.workCalendarOutFlag">工作日历</el-dropdown-item>
  176. <el-dropdown-item class="customer-li" command="批量维护工作日历"
  177. :disabled="primaryMenuButton.batchWorkCalendarFlag">批量维护工作日历</el-dropdown-item>
  178. <el-dropdown-item class="customer-li" command="分批排产"
  179. :disabled="primaryMenuButton.splitScheduleFlag">分批排产</el-dropdown-item>
  180. <el-dropdown-item class="customer-li" command="重新排产"
  181. :disabled="primaryMenuButton.reScheduleOrderFlag">重新排产</el-dropdown-item>
  182. <el-dropdown-item class="customer-li" command="查看物料库存"
  183. :disabled="primaryMenuButton.partStockFlag">查看物料库存</el-dropdown-item>
  184. </el-dropdown-menu>
  185. </el-dropdown>
  186. </el-form>
  187. <el-table
  188. :height="height"
  189. :data="shopOrderList"
  190. border
  191. ref="routingTable"
  192. @row-click="setCurrentRoutingRow"
  193. :row-class-name="routingRowClassName"
  194. @row-dblclick="startScheduleOperation"
  195. v-loading="dataListLoading"
  196. style="margin-top: -20px; width: 100%;">
  197. <el-table-column
  198. v-for="(item,index) in columnOrderArray" :key="index"
  199. :sortable="item.columnSortable"
  200. :prop="item.columnProp"
  201. :header-align="item.headerAlign"
  202. :show-overflow-tooltip="item.showOverflowTooltip"
  203. :align="item.align"
  204. :fixed="item.fixed"
  205. :width="item.columnWidth"
  206. :label="item.columnLabel">
  207. <template slot-scope="scope">
  208. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  209. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  210. style="width: 100px; height: 80px"/></span>
  211. </template>
  212. </el-table-column>
  213. </el-table>
  214. </el-main>
  215. <!-- 工单明细表信息 -->
  216. <el-main style="margin-left: -20px; margin-top: -35px; width: 104%;">
  217. <el-form :inline="true" label-position="top" label-width="100px">
  218. <el-form-item :label="'明细记录'">
  219. </el-form-item>
  220. <el-dropdown class="customer-dropdown" size="mini" @command="scheduleHandleCommand">
  221. <el-button type="primary" @click="controlDetailMenuBun">
  222. 明细菜单<i class="el-icon-arrow-down el-icon--right"></i>
  223. </el-button>
  224. <el-dropdown-menu slot="dropdown">
  225. <el-dropdown-item class="customer-li" command="生产工单"
  226. :disabled="detailMenuButton.shopOrderFlag">生产订单</el-dropdown-item>
  227. <el-dropdown-item class="customer-li" command="工作日历"
  228. :disabled="detailMenuButton.workCalendarOutFlag">工作日历</el-dropdown-item>
  229. <el-dropdown-item class="customer-li" command="更改等待时间"
  230. :disabled="detailMenuButton.changeWaitTimeFlag">更改等待时间</el-dropdown-item>
  231. <el-dropdown-item class="customer-li" command="根据工艺路线调整"
  232. :disabled="detailMenuButton.changeScheduleByRoutingFlag">根据工艺路线调整</el-dropdown-item>
  233. <el-dropdown-item class="customer-li" command="根据工作日历调整"
  234. :disabled="detailMenuButton.changeScheduleByRoutingFlag">根据工作日历调整</el-dropdown-item>
  235. <el-dropdown-item class="customer-li" command="查看物料库存"
  236. :disabled="detailMenuButton.partStockFlag">查看物料库存</el-dropdown-item>
  237. </el-dropdown-menu>
  238. </el-dropdown>
  239. </el-form>
  240. <el-table
  241. :height="height"
  242. :data="orderScheduleList"
  243. border
  244. highlight-current-row
  245. ref="scheduleTable"
  246. :row-class-name="scheduleRowClassName"
  247. @row-click="setCurrentSchedulingRow"
  248. @current-change="currentSchedulingRow"
  249. @row-dblclick="warnCancelScheduleConfirm"
  250. v-loading="dataListLoading"
  251. style="margin-top: -20px; width: 100%;">
  252. <el-table-column
  253. v-for="(item,index) in columnOrderScheduleArray" :key="index"
  254. :sortable="item.columnSortable"
  255. :prop="item.columnProp"
  256. :header-align="item.headerAlign"
  257. :show-overflow-tooltip="item.showOverflowTooltip"
  258. :align="item.align"
  259. :fixed="item.fixed"
  260. :width="item.columnWidth"
  261. :label="item.columnLabel">
  262. <template slot-scope="scope">
  263. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  264. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  265. style="width: 100px; height: 80px"/></span>
  266. </template>
  267. </el-table-column>
  268. </el-table>
  269. </el-main>
  270. <!--列表的组件-->
  271. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  272. <!-- 分批排产的组件 -->
  273. <comSplitSchedule ref="comSplitSchedule" :close-on-click-modal="false"
  274. :visible.sync="showSplitScheduleFlag"
  275. @initAddSplitSchedule="initAddSplitSchedule">
  276. </comSplitSchedule>
  277. <!-- 工作日历外的组件 -->
  278. <comWorkCalendarOut ref="comWorkCalendarOut" :close-on-click-modal="false"
  279. :visible.sync="showWorkCalendarOut">
  280. </comWorkCalendarOut>
  281. <!-- 批量工作日历的组件 -->
  282. <comBatchWorkCalendar ref="comBatchWorkCalendar" :close-on-click-modal="false"
  283. :visible.sync="showBatchWorkCalendar">
  284. </comBatchWorkCalendar>
  285. <!-- 物料库存查询 -->
  286. <comPartStock ref="comPartStock" :close-on-click-modal="false"
  287. :visible.sync="showPartStockFlag">
  288. </comPartStock>
  289. <!-- 更改等待时间 -->
  290. <comChangeWaitTime ref="comChangeWaitTime" :close-on-click-modal="false"
  291. :visible.sync="showChangeWaitTime"
  292. @changeScheduleWaitTimes="changeScheduleWaitTimes">
  293. </comChangeWaitTime>
  294. </div>
  295. </template>
  296. <script>
  297. import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
  298. import comSplitSchedule from '@/views/modules/schedule/com_split_schedule';/*分批排产的modal*/
  299. import comWorkCalendarOut from "../common/com_work_calendar_out";/*工作日历外组件*/
  300. import comBatchWorkCalendar from "../common/com_batch_work_calendar";/*批量维护工作日历外组件*/
  301. import comPartStock from "../common/com_part_stock";/*展示物料库存的组件*/
  302. import comChangeWaitTime from "./com_change_wait_time";/*修改等待派工单的等待时间*/
  303. import {
  304. getResourceRestList,
  305. getShopOrderList,
  306. getOrderScheduleList,
  307. getCurrentWorkCenterNoByResourceId,
  308. scheduleWorkOrder,
  309. cancelSoSchedule,
  310. addWaitSchedule,
  311. reScheduleWorkOrders,
  312. moveUpSchedule,
  313. moveDownSchedule,
  314. updateScheduleWaitTimes,
  315. refreshScheduleByRouting,
  316. refreshScheduleByCalendar,
  317. } from '@/api/schedule/order_schedule.js'
  318. export default {
  319. data() {
  320. return {
  321. height: 200,
  322. tagNo: '',
  323. showWorkCalendarOut: false,
  324. showBatchWorkCalendar: false,
  325. showSplitScheduleFlag: false,
  326. showPartStockFlag: false,
  327. showChangeWaitTime: false,
  328. scheduleIndex: -1,
  329. modelFlag: false,
  330. modelInputFlag: true,
  331. currentRoutingRow: {},
  332. currentSchedlingRow: {},
  333. selectList: [],
  334. pageData: {
  335. site: this.$store.state.user.site,
  336. username: this.$store.state.user.name,
  337. orderNo: '',
  338. itemNo: '',
  339. seqNo: 0,
  340. resourceId: '',
  341. workCenterNo: '',
  342. enterTime1: '',
  343. enterTime2: this.dayjs(new Date()).format('YYYY-MM-DD'),
  344. needTime1: '',
  345. needTime2: this.dayjs(new Date()).format('YYYY-MM-DD'),
  346. scheduleDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
  347. scheduleTime: '08:30',
  348. specifiedTime: 'N',
  349. scheduledQty: 0,
  350. waitTimes: 0,
  351. scheduleSeqNo: 0,
  352. planStartTime: '',
  353. calendarId: '',
  354. calendarDesc: '',
  355. status: 1
  356. },
  357. resourceShiftList: [],
  358. shopOrderList: [],
  359. orderScheduleList: [],
  360. dataListLoading: false,
  361. columnTimeArray: [
  362. {
  363. userId: this.$store.state.user.name,
  364. functionId: 5301,
  365. serialNumber: '5301ShiftShiftDate',
  366. tableId: "5301Shift",
  367. tableName: "工作日历",
  368. columnProp: "shiftDate",
  369. headerAlign: "center",
  370. align: "center",
  371. columnLabel: "日期字段",
  372. columnWidth: 90,
  373. columnHidden: false,
  374. columnImage: false,
  375. columnSortable: false,
  376. sortLv: 0,
  377. status: true,
  378. fixed: false
  379. },
  380. {
  381. userId: this.$store.state.user.name,
  382. functionId: 5301,
  383. serialNumber: '5301ShiftShiftInfo',
  384. tableId: "5301Shift",
  385. tableName: "工作日历",
  386. columnProp: "shiftInfo",
  387. headerAlign: "center",
  388. align: "center",
  389. columnLabel: "休息时间览表",
  390. columnWidth: 320,
  391. columnHidden: false,
  392. columnImage: false,
  393. columnSortable: false,
  394. sortLv: 0,
  395. status: true,
  396. fixed: false
  397. }
  398. ],
  399. columnOrderArray: [
  400. {
  401. userId: this.$store.state.user.name,
  402. functionId: 5301,
  403. serialNumber: '5301OrderOrderNo',
  404. tableId: "5301Order",
  405. tableName: "工单表",
  406. columnProp: "orderNo",
  407. headerAlign: "center",
  408. align: "center",
  409. columnLabel: "订单号",
  410. columnWidth: 80,
  411. columnHidden: false,
  412. columnImage: false,
  413. columnSortable: false,
  414. sortLv: 0,
  415. status: true,
  416. fixed: false
  417. },
  418. {
  419. userId: this.$store.state.user.name,
  420. functionId: 5301,
  421. serialNumber: '5301OrderItemNo',
  422. tableId: "5301Order",
  423. tableName: "工单表",
  424. columnProp: "itemNo",
  425. headerAlign: "center",
  426. align: "center",
  427. columnLabel: "工序号",
  428. columnWidth: 60,
  429. columnHidden: false,
  430. columnImage: false,
  431. columnSortable: false,
  432. sortLv: 0,
  433. status: true,
  434. fixed: false
  435. },
  436. {
  437. userId: this.$store.state.user.name,
  438. functionId: 5301,
  439. serialNumber: '5301OrderItemDesc',
  440. tableId: "5301Order",
  441. tableName: "工单表",
  442. columnProp: "itemDesc",
  443. headerAlign: "center",
  444. align: "center",
  445. columnLabel: "工序名称",
  446. columnWidth: 80,
  447. columnHidden: false,
  448. columnImage: false,
  449. columnSortable: false,
  450. sortLv: 0,
  451. status: true,
  452. fixed: false
  453. },
  454. {
  455. userId: this.$store.state.user.name,
  456. functionId: 5301,
  457. serialNumber: '5301OrderNeedDate',
  458. tableId: "5301Order",
  459. tableName: "工单表",
  460. columnProp: "needDate",
  461. headerAlign: "center",
  462. align: "center",
  463. columnLabel: "要求完工日期",
  464. columnWidth: 80,
  465. columnHidden: false,
  466. columnImage: false,
  467. columnSortable: false,
  468. sortLv: 0,
  469. status: true,
  470. fixed: false
  471. },
  472. {
  473. userId: this.$store.state.user.name,
  474. functionId: 5301,
  475. serialNumber: '5301OrderPartNo',
  476. tableId: "5301Order",
  477. tableName: "工单表",
  478. columnProp: "partNo",
  479. headerAlign: "center",
  480. align: "center",
  481. columnLabel: "产品编码",
  482. columnWidth: 80,
  483. columnHidden: false,
  484. columnImage: false,
  485. columnSortable: false,
  486. sortLv: 0,
  487. status: true,
  488. fixed: false
  489. },
  490. {
  491. userId: this.$store.state.user.name,
  492. functionId: 5301,
  493. serialNumber: '5301OrderCustomerName',
  494. tableId: "5301Order",
  495. tableName: "工单表",
  496. columnProp: "customerName",
  497. headerAlign: "center",
  498. align: "center",
  499. columnLabel: "客户名称",
  500. columnWidth: 80,
  501. columnHidden: false,
  502. columnImage: false,
  503. columnSortable: false,
  504. sortLv: 0,
  505. status: true,
  506. fixed: false
  507. },
  508. {
  509. userId: this.$store.state.user.name,
  510. functionId: 5301,
  511. serialNumber: '5301OrderCustPartNo',
  512. tableId: "5301Order",
  513. tableName: "工单表",
  514. columnProp: "custPartNo",
  515. headerAlign: "center",
  516. align: "center",
  517. columnLabel: "客户产品料号",
  518. columnWidth: 80,
  519. columnHidden: false,
  520. columnImage: false,
  521. columnSortable: false,
  522. sortLv: 0,
  523. status: true,
  524. fixed: false
  525. },
  526. {
  527. userId: this.$store.state.user.name,
  528. functionId: 5301,
  529. serialNumber: '5301OrderPartDesc',
  530. tableId: "5301Order",
  531. tableName: "工单表",
  532. columnProp: "partDesc",
  533. headerAlign: "center",
  534. align: "center",
  535. columnLabel: "产成品名称",
  536. columnWidth: 80,
  537. columnHidden: false,
  538. columnImage: false,
  539. columnSortable: false,
  540. sortLv: 0,
  541. status: true,
  542. fixed: false
  543. },
  544. {
  545. userId: this.$store.state.user.name,
  546. functionId: 5301,
  547. serialNumber: '5301OrderLotSize',
  548. tableId: "5301Order",
  549. tableName: "工单表",
  550. columnProp: "lotSize",
  551. headerAlign: "center",
  552. align: "center",
  553. columnLabel: "订单量",
  554. columnWidth: 80,
  555. columnHidden: false,
  556. columnImage: false,
  557. columnSortable: false,
  558. sortLv: 0,
  559. status: true,
  560. fixed: false
  561. },
  562. {
  563. userId: this.$store.state.user.name,
  564. functionId: 5301,
  565. serialNumber: '5301OrderQtyToSchedule',
  566. tableId: "5301Order",
  567. tableName: "工单表",
  568. columnProp: "qtyToSchedule",
  569. headerAlign: "center",
  570. align: "center",
  571. columnLabel: "待排产数量",
  572. columnWidth: 80,
  573. columnHidden: false,
  574. columnImage: false,
  575. columnSortable: false,
  576. sortLv: 0,
  577. status: true,
  578. fixed: false
  579. },
  580. {
  581. userId: this.$store.state.user.name,
  582. functionId: 5301,
  583. serialNumber: '5301OrderQtyScheduled',
  584. tableId: "5301Order",
  585. tableName: "工单表",
  586. columnProp: "qtyScheduled",
  587. headerAlign: "center",
  588. align: "center",
  589. columnLabel: "已排产数量",
  590. columnWidth: 80,
  591. columnHidden: false,
  592. columnImage: false,
  593. columnSortable: false,
  594. sortLv: 0,
  595. status: true,
  596. fixed: false
  597. },
  598. {
  599. userId: this.$store.state.user.name,
  600. functionId: 5301,
  601. serialNumber: '5301OrderQtyReported',
  602. tableId: "5301Order",
  603. tableName: "工单表",
  604. columnProp: "qtyReported",
  605. headerAlign: "center",
  606. align: "center",
  607. columnLabel: "已报工数量",
  608. columnWidth: 80,
  609. columnHidden: false,
  610. columnImage: false,
  611. columnSortable: false,
  612. sortLv: 0,
  613. status: true,
  614. fixed: false
  615. },
  616. {
  617. userId: this.$store.state.user.name,
  618. functionId: 5301,
  619. serialNumber: '5301OrderSpec',
  620. tableId: "5301Order",
  621. tableName: "工单表",
  622. columnProp: "spec",
  623. headerAlign: "center",
  624. align: "center",
  625. columnLabel: "规格型号",
  626. columnWidth: 80,
  627. columnHidden: false,
  628. columnImage: false,
  629. columnSortable: false,
  630. sortLv: 0,
  631. status: true,
  632. fixed: false
  633. },
  634. {
  635. userId: this.$store.state.user.name,
  636. functionId: 5301,
  637. serialNumber: '5301OrderSite',
  638. tableId: "5301Order",
  639. tableName: "工单表",
  640. columnProp: "site",
  641. headerAlign: "center",
  642. align: "center",
  643. columnLabel: "工厂编号",
  644. columnWidth: 80,
  645. columnHidden: false,
  646. columnImage: false,
  647. columnSortable: false,
  648. sortLv: 0,
  649. status: true,
  650. fixed: false
  651. },
  652. {
  653. userId: this.$store.state.user.name,
  654. functionId: 5301,
  655. serialNumber: '5301OrderWorkCenterNo',
  656. tableId: "5301Order",
  657. tableName: "工单表",
  658. columnProp: "workCenterNo",
  659. headerAlign: "center",
  660. align: "center",
  661. columnLabel: "加工中心",
  662. columnWidth: 80,
  663. columnHidden: false,
  664. columnImage: false,
  665. columnSortable: false,
  666. sortLv: 0,
  667. status: true,
  668. fixed: false
  669. },
  670. {
  671. userId: this.$store.state.user.name,
  672. functionId: 5301,
  673. serialNumber: '5301OrderNextItemNo',
  674. tableId: "5301Order",
  675. tableName: "工单表",
  676. columnProp: "nextItemNo",
  677. headerAlign: "center",
  678. align: "center",
  679. columnLabel: "下道工序",
  680. columnWidth: 80,
  681. columnHidden: false,
  682. columnImage: false,
  683. columnSortable: false,
  684. sortLv: 0,
  685. status: true,
  686. fixed: false
  687. },
  688. {
  689. userId: this.$store.state.user.name,
  690. functionId: 5301,
  691. serialNumber: '5301OrderNextItemDesc',
  692. tableId: "5301Order",
  693. tableName: "工单表",
  694. columnProp: "nextItemDesc",
  695. headerAlign: "center",
  696. align: "center",
  697. columnLabel: "下道工序名称",
  698. columnWidth: 80,
  699. columnHidden: false,
  700. columnImage: false,
  701. columnSortable: false,
  702. sortLv: 0,
  703. status: true,
  704. fixed: false
  705. },
  706. {
  707. userId: this.$store.state.user.name,
  708. functionId: 5301,
  709. serialNumber: '5301OrderNextScheduledFlag',
  710. tableId: "5301Order",
  711. tableName: "工单表",
  712. columnProp: "nextScheduledFlag",
  713. headerAlign: "center",
  714. align: "center",
  715. columnLabel: "下道工序已排产",
  716. columnWidth: 80,
  717. columnHidden: false,
  718. columnImage: false,
  719. columnSortable: false,
  720. sortLv: 0,
  721. status: true,
  722. fixed: false
  723. },
  724. {
  725. userId: this.$store.state.user.name,
  726. functionId: 5301,
  727. serialNumber: '5301OrderPreItemNo',
  728. tableId: "5301Order",
  729. tableName: "工单表",
  730. columnProp: "preItemNo",
  731. headerAlign: "center",
  732. align: "center",
  733. columnLabel: "上道工序",
  734. columnWidth: 80,
  735. columnHidden: false,
  736. columnImage: false,
  737. columnSortable: false,
  738. sortLv: 0,
  739. status: true,
  740. fixed: false
  741. },
  742. {
  743. userId: this.$store.state.user.name,
  744. functionId: 5301,
  745. serialNumber: '5301OrderPreItemDesc',
  746. tableId: "5301Order",
  747. tableName: "工单表",
  748. columnProp: "preItemDesc",
  749. headerAlign: "center",
  750. align: "center",
  751. columnLabel: "上道工序名称",
  752. columnWidth: 80,
  753. columnHidden: false,
  754. columnImage: false,
  755. columnSortable: false,
  756. sortLv: 0,
  757. status: true,
  758. fixed: false
  759. },
  760. {
  761. userId: this.$store.state.user.name,
  762. functionId: 5301,
  763. serialNumber: '5301OrderPreScheduledFlag',
  764. tableId: "5301Order",
  765. tableName: "工单表",
  766. columnProp: "preScheduledFlag",
  767. headerAlign: "center",
  768. align: "center",
  769. columnLabel: "上道工序已排产",
  770. columnWidth: 80,
  771. columnHidden: false,
  772. columnImage: false,
  773. columnSortable: false,
  774. sortLv: 0,
  775. status: true,
  776. fixed: false
  777. },
  778. {
  779. userId: this.$store.state.user.name,
  780. functionId: 5301,
  781. serialNumber: '5301OrderScheduledFlag',
  782. tableId: "5301Order",
  783. tableName: "工单表",
  784. columnProp: "scheduledFlag",
  785. headerAlign: "center",
  786. align: "center",
  787. columnLabel: "是否排产",
  788. columnWidth: 80,
  789. columnHidden: false,
  790. columnImage: false,
  791. columnSortable: false,
  792. sortLv: 0,
  793. status: true,
  794. fixed: false
  795. },
  796. {
  797. userId: this.$store.state.user.name,
  798. functionId: 5301,
  799. serialNumber: '5301OrderAvailResource',
  800. tableId: "5301Order",
  801. tableName: "工单表",
  802. columnProp: "availResource",
  803. headerAlign: "center",
  804. align: "center",
  805. columnLabel: "可用机台",
  806. columnWidth: 80,
  807. columnHidden: false,
  808. columnImage: false,
  809. columnSortable: false,
  810. sortLv: 0,
  811. status: true,
  812. fixed: false
  813. },
  814. {
  815. userId: this.$store.state.user.name,
  816. functionId: 5301,
  817. serialNumber: '5301OrderEnterDate',
  818. tableId: "5301Order",
  819. tableName: "工单表",
  820. columnProp: "enterDate",
  821. headerAlign: "center",
  822. align: "center",
  823. columnLabel: "录入日期",
  824. columnWidth: 125,
  825. columnHidden: false,
  826. columnImage: false,
  827. columnSortable: false,
  828. sortLv: 0,
  829. status: true,
  830. fixed: false
  831. },
  832. {
  833. userId: this.$store.state.user.name,
  834. functionId: 5301,
  835. serialNumber: '5301OrderScheduleToPlanTime',
  836. tableId: "5301Order",
  837. tableName: "工单表",
  838. columnProp: "scheduleToPlanTime",
  839. headerAlign: "center",
  840. align: "center",
  841. columnLabel: "计划时间",
  842. columnWidth: 80,
  843. columnHidden: false,
  844. columnImage: false,
  845. columnSortable: false,
  846. sortLv: 0,
  847. status: true,
  848. fixed: false
  849. },
  850. {
  851. userId: this.$store.state.user.name,
  852. functionId: 5301,
  853. serialNumber: '5301OrderMachRunFactor',
  854. tableId: "5301Order",
  855. tableName: "工单表",
  856. columnProp: "machRunFactor",
  857. headerAlign: "center",
  858. align: "center",
  859. columnLabel: "单位产出",
  860. columnWidth: 80,
  861. columnHidden: false,
  862. columnImage: false,
  863. columnSortable: false,
  864. sortLv: 0,
  865. status: true,
  866. fixed: false
  867. },
  868. {
  869. userId: this.$store.state.user.name,
  870. functionId: 5301,
  871. serialNumber: '5301OrderMachSetupTime',
  872. tableId: "5301Order",
  873. tableName: "工单表",
  874. columnProp: "machSetupTime",
  875. headerAlign: "center",
  876. align: "center",
  877. columnLabel: "调机时间",
  878. columnWidth: 80,
  879. columnHidden: false,
  880. columnImage: false,
  881. columnSortable: false,
  882. sortLv: 0,
  883. status: true,
  884. fixed: false
  885. },
  886. {
  887. userId: this.$store.state.user.name,
  888. functionId: 5301,
  889. serialNumber: '5301OrderFactorUnit',
  890. tableId: "5301Order",
  891. tableName: "工单表",
  892. columnProp: "factorUnit",
  893. headerAlign: "center",
  894. align: "center",
  895. columnLabel: "产出单位",
  896. columnWidth: 80,
  897. columnHidden: false,
  898. columnImage: false,
  899. columnSortable: false,
  900. sortLv: 0,
  901. status: true,
  902. fixed: false
  903. },
  904. {
  905. userId: this.$store.state.user.name,
  906. functionId: 5301,
  907. serialNumber: '5301OrderQtyScheduledPreOps',
  908. tableId: "5301Order",
  909. tableName: "工单表",
  910. columnProp: "qtyScheduledPreOps",
  911. headerAlign: "center",
  912. align: "center",
  913. columnLabel: "前道工序已排产数量",
  914. columnWidth: 80,
  915. columnHidden: false,
  916. columnImage: false,
  917. columnSortable: false,
  918. sortLv: 0,
  919. status: true,
  920. fixed: false
  921. },
  922. {
  923. userId: this.$store.state.user.name,
  924. functionId: 5301,
  925. serialNumber: '5301OrderQtyApprovedPreOps',
  926. tableId: "5301Order",
  927. tableName: "工单表",
  928. columnProp: "qtyApprovedPreOps",
  929. headerAlign: "center",
  930. align: "center",
  931. columnLabel: "前道工序已报合格数",
  932. columnWidth: 80,
  933. columnHidden: false,
  934. columnImage: false,
  935. columnSortable: false,
  936. sortLv: 0,
  937. status: true,
  938. fixed: false
  939. },
  940. {
  941. userId: this.$store.state.user.name,
  942. functionId: 5301,
  943. serialNumber: '5301OrderOriSOOrderNo',
  944. tableId: "5301Order",
  945. tableName: "工单表",
  946. columnProp: "oriSOOrderNo",
  947. headerAlign: "center",
  948. align: "center",
  949. columnLabel: "SAP参考号",
  950. columnWidth: 80,
  951. columnHidden: false,
  952. columnImage: false,
  953. columnSortable: false,
  954. sortLv: 0,
  955. status: true,
  956. fixed: false
  957. }
  958. ],
  959. columnOrderScheduleArray: [
  960. {
  961. userId: this.$store.state.user.name,
  962. functionId: 5301,
  963. serialNumber: '5301ScheduleScheduledSeqNo',
  964. tableId: "5301Schedule",
  965. tableName: "排产明细表",
  966. columnProp: "scheduledSeqNo",
  967. headerAlign: "center",
  968. align: "center",
  969. columnLabel: "排产序号",
  970. columnWidth: 80,
  971. columnHidden: false,
  972. columnImage: false,
  973. columnSortable: false,
  974. sortLv: 0,
  975. status: true,
  976. fixed: false
  977. },
  978. {
  979. userId: this.$store.state.user.name,
  980. functionId: 5301,
  981. serialNumber: '5301SchedulePlanStartTime',
  982. tableId: "5301Schedule",
  983. tableName: "排产明细表",
  984. columnProp: "planStartTime",
  985. headerAlign: "center",
  986. align: "center",
  987. columnLabel: "计划开工时间",
  988. columnWidth: 125,
  989. columnHidden: false,
  990. columnImage: false,
  991. columnSortable: false,
  992. sortLv: 0,
  993. status: true,
  994. fixed: false
  995. },
  996. {
  997. userId: this.$store.state.user.name,
  998. functionId: 5301,
  999. serialNumber: '5301SchedulePlanFinishTime',
  1000. tableId: "5301Schedule",
  1001. tableName: "排产明细表",
  1002. columnProp: "planFinishTime",
  1003. headerAlign: "center",
  1004. align: "center",
  1005. columnLabel: "计划完工时间",
  1006. columnWidth: 125,
  1007. columnHidden: false,
  1008. columnImage: false,
  1009. columnSortable: false,
  1010. sortLv: 0,
  1011. status: true,
  1012. fixed: false
  1013. },
  1014. {
  1015. userId: this.$store.state.user.name,
  1016. functionId: 5301,
  1017. serialNumber: '5301ScheduleTimeRequired',
  1018. tableId: "5301Schedule",
  1019. tableName: "排产明细表",
  1020. columnProp: "timeRequired",
  1021. headerAlign: "center",
  1022. align: "center",
  1023. columnLabel: "计划时间",
  1024. columnWidth: 80,
  1025. columnHidden: false,
  1026. columnImage: false,
  1027. columnSortable: false,
  1028. sortLv: 0,
  1029. status: true,
  1030. fixed: false
  1031. },
  1032. {
  1033. userId: this.$store.state.user.name,
  1034. functionId: 5301,
  1035. serialNumber: '5301ScheduleOrderNo',
  1036. tableId: "5301Schedule",
  1037. tableName: "排产明细表",
  1038. columnProp: "orderNo",
  1039. headerAlign: "center",
  1040. align: "center",
  1041. columnLabel: "订单号",
  1042. columnWidth: 80,
  1043. columnHidden: false,
  1044. columnImage: false,
  1045. columnSortable: false,
  1046. sortLv: 0,
  1047. status: true,
  1048. fixed: false
  1049. },
  1050. {
  1051. userId: this.$store.state.user.name,
  1052. functionId: 5301,
  1053. serialNumber: '5301ScheduleNeedDate',
  1054. tableId: "5301Schedule",
  1055. tableName: "排产明细表",
  1056. columnProp: "needDate",
  1057. headerAlign: "center",
  1058. align: "center",
  1059. columnLabel: "需求日期",
  1060. columnWidth: 80,
  1061. columnHidden: false,
  1062. columnImage: false,
  1063. columnSortable: false,
  1064. sortLv: 0,
  1065. status: true,
  1066. fixed: false
  1067. },
  1068. {
  1069. userId: this.$store.state.user.name,
  1070. functionId: 5301,
  1071. serialNumber: '5301ScheduleItemNo',
  1072. tableId: "5301Schedule",
  1073. tableName: "排产明细表",
  1074. columnProp: "itemNo",
  1075. headerAlign: "center",
  1076. align: "center",
  1077. columnLabel: "工序号",
  1078. columnWidth: 80,
  1079. columnHidden: false,
  1080. columnImage: false,
  1081. columnSortable: false,
  1082. sortLv: 0,
  1083. status: true,
  1084. fixed: false
  1085. },
  1086. {
  1087. userId: this.$store.state.user.name,
  1088. functionId: 5301,
  1089. serialNumber: '5301ScheduleItemDesc',
  1090. tableId: "5301Schedule",
  1091. tableName: "排产明细表",
  1092. columnProp: "itemDesc",
  1093. headerAlign: "center",
  1094. align: "center",
  1095. columnLabel: "工序名称",
  1096. columnWidth: 80,
  1097. columnHidden: false,
  1098. columnImage: false,
  1099. columnSortable: false,
  1100. sortLv: 0,
  1101. status: true,
  1102. fixed: false
  1103. },
  1104. {
  1105. userId: this.$store.state.user.name,
  1106. functionId: 5301,
  1107. serialNumber: '5301SchedulePartNo',
  1108. tableId: "5301Schedule",
  1109. tableName: "排产明细表",
  1110. columnProp: "partNo",
  1111. headerAlign: "center",
  1112. align: "center",
  1113. columnLabel: "产品编码",
  1114. columnWidth: 120,
  1115. columnHidden: false,
  1116. columnImage: false,
  1117. columnSortable: false,
  1118. sortLv: 0,
  1119. status: true,
  1120. fixed: false
  1121. },
  1122. {
  1123. userId: this.$store.state.user.name,
  1124. functionId: 5301,
  1125. serialNumber: '5301SchedulePartDesc',
  1126. tableId: "5301Schedule",
  1127. tableName: "排产明细表",
  1128. columnProp: "partDesc",
  1129. headerAlign: "center",
  1130. align: "center",
  1131. columnLabel: "产品名称",
  1132. columnWidth: 80,
  1133. columnHidden: false,
  1134. columnImage: false,
  1135. columnSortable: false,
  1136. sortLv: 0,
  1137. status: true,
  1138. fixed: false
  1139. },
  1140. {
  1141. userId: this.$store.state.user.name,
  1142. functionId: 5301,
  1143. serialNumber: '5301OrderSpec',
  1144. tableId: "5301Schedule",
  1145. tableName: "排产明细表",
  1146. columnProp: "spec",
  1147. headerAlign: "center",
  1148. align: "center",
  1149. columnLabel: "规格型号",
  1150. columnWidth: 80,
  1151. columnHidden: false,
  1152. columnImage: false,
  1153. columnSortable: false,
  1154. sortLv: 0,
  1155. status: true,
  1156. fixed: false
  1157. },
  1158. {
  1159. userId: this.$store.state.user.name,
  1160. functionId: 5301,
  1161. serialNumber: '5301ScheduleQtyRequired',
  1162. tableId: "5301Schedule",
  1163. tableName: "排产明细表",
  1164. columnProp: "qtyRequired",
  1165. headerAlign: "center",
  1166. align: "center",
  1167. columnLabel: "待生产数量",
  1168. columnWidth: 80,
  1169. columnHidden: false,
  1170. columnImage: false,
  1171. columnSortable: false,
  1172. sortLv: 0,
  1173. status: true,
  1174. fixed: false
  1175. },
  1176. {
  1177. userId: this.$store.state.user.name,
  1178. functionId: 5301,
  1179. serialNumber: '5301ScheduleQtyRequired',
  1180. tableId: "5301Schedule",
  1181. tableName: "排产明细表",
  1182. columnProp: "qtyRequired",
  1183. headerAlign: "center",
  1184. align: "center",
  1185. columnLabel: "派工单需求数量",
  1186. columnWidth: 80,
  1187. columnHidden: false,
  1188. columnImage: false,
  1189. columnSortable: false,
  1190. sortLv: 0,
  1191. status: true,
  1192. fixed: false
  1193. },
  1194. {
  1195. userId: this.$store.state.user.name,
  1196. functionId: 5301,
  1197. serialNumber: '5301ScheduleQtyReported',
  1198. tableId: "5301Schedule",
  1199. tableName: "排产明细表",
  1200. columnProp: "qtyReported",
  1201. headerAlign: "center",
  1202. align: "center",
  1203. columnLabel: "已报告数量",
  1204. columnWidth: 80,
  1205. columnHidden: false,
  1206. columnImage: false,
  1207. columnSortable: false,
  1208. sortLv: 0,
  1209. status: true,
  1210. fixed: false
  1211. },
  1212. {
  1213. userId: this.$store.state.user.name,
  1214. functionId: 5301,
  1215. serialNumber: '5301SchedulePreItemNo',
  1216. tableId: "5301Schedule",
  1217. tableName: "排产明细表",
  1218. columnProp: "preItemNo",
  1219. headerAlign: "center",
  1220. align: "center",
  1221. columnLabel: "前道工序",
  1222. columnWidth: 80,
  1223. columnHidden: false,
  1224. columnImage: false,
  1225. columnSortable: false,
  1226. sortLv: 0,
  1227. status: true,
  1228. fixed: false
  1229. },
  1230. {
  1231. userId: this.$store.state.user.name,
  1232. functionId: 5301,
  1233. serialNumber: '5301SchedulePreItemDesc',
  1234. tableId: "5301Schedule",
  1235. tableName: "排产明细表",
  1236. columnProp: "preItemDesc",
  1237. headerAlign: "center",
  1238. align: "center",
  1239. columnLabel: "前道工序名称",
  1240. columnWidth: 80,
  1241. columnHidden: false,
  1242. columnImage: false,
  1243. columnSortable: false,
  1244. sortLv: 0,
  1245. status: true,
  1246. fixed: false
  1247. },
  1248. {
  1249. userId: this.$store.state.user.name,
  1250. functionId: 5301,
  1251. serialNumber: '5301SchedulePreScheduledFlag',
  1252. tableId: "5301Schedule",
  1253. tableName: "排产明细表",
  1254. columnProp: "preScheduledFlag",
  1255. headerAlign: "center",
  1256. align: "center",
  1257. columnLabel: "前道工序是否排产",
  1258. columnWidth: 80,
  1259. columnHidden: false,
  1260. columnImage: false,
  1261. columnSortable: false,
  1262. sortLv: 0,
  1263. status: true,
  1264. fixed: false
  1265. },
  1266. {
  1267. userId: this.$store.state.user.name,
  1268. functionId: 5301,
  1269. serialNumber: '5301ScheduleNextItemNo',
  1270. tableId: "5301Schedule",
  1271. tableName: "排产明细表",
  1272. columnProp: "nextItemNo",
  1273. headerAlign: "center",
  1274. align: "center",
  1275. columnLabel: "后道工序",
  1276. columnWidth: 80,
  1277. columnHidden: false,
  1278. columnImage: false,
  1279. columnSortable: false,
  1280. sortLv: 0,
  1281. status: true,
  1282. fixed: false
  1283. },
  1284. {
  1285. userId: this.$store.state.user.name,
  1286. functionId: 5301,
  1287. serialNumber: '5301ScheduleNextItemDesc',
  1288. tableId: "5301Schedule",
  1289. tableName: "排产明细表",
  1290. columnProp: "nextItemDesc",
  1291. headerAlign: "center",
  1292. align: "center",
  1293. columnLabel: "后道工序名称",
  1294. columnWidth: 80,
  1295. columnHidden: false,
  1296. columnImage: false,
  1297. columnSortable: false,
  1298. sortLv: 0,
  1299. status: true,
  1300. fixed: false
  1301. },
  1302. {
  1303. userId: this.$store.state.user.name,
  1304. functionId: 5301,
  1305. serialNumber: '5301ScheduleNextScheduledFlag',
  1306. tableId: "5301Schedule",
  1307. tableName: "排产明细表",
  1308. columnProp: "nextScheduledFlag",
  1309. headerAlign: "center",
  1310. align: "center",
  1311. columnLabel: "后道工序是否排产",
  1312. columnWidth: 80,
  1313. columnHidden: false,
  1314. columnImage: false,
  1315. columnSortable: false,
  1316. sortLv: 0,
  1317. status: true,
  1318. fixed: false
  1319. },
  1320. {
  1321. userId: this.$store.state.user.name,
  1322. functionId: 5301,
  1323. serialNumber: '5301ScheduleResourceId',
  1324. tableId: "5301Schedule",
  1325. tableName: "排产明细表",
  1326. columnProp: "resourceId",
  1327. headerAlign: "center",
  1328. align: "center",
  1329. columnLabel: "机台号",
  1330. columnWidth: 80,
  1331. columnHidden: false,
  1332. columnImage: false,
  1333. columnSortable: false,
  1334. sortLv: 0,
  1335. status: true,
  1336. fixed: false
  1337. },
  1338. {
  1339. userId: this.$store.state.user.name,
  1340. functionId: 5301,
  1341. serialNumber: '5301ScheduleCustomerName',
  1342. tableId: "5301Schedule",
  1343. tableName: "排产明细表",
  1344. columnProp: "customerName",
  1345. headerAlign: "center",
  1346. align: "center",
  1347. columnLabel: "客户名称",
  1348. columnWidth: 80,
  1349. columnHidden: false,
  1350. columnImage: false,
  1351. columnSortable: false,
  1352. sortLv: 0,
  1353. status: true,
  1354. fixed: false
  1355. },
  1356. {
  1357. userId: this.$store.state.user.name,
  1358. functionId: 5301,
  1359. serialNumber: '5301ScheduleEnterDate',
  1360. tableId: "5301Schedule",
  1361. tableName: "排产明细表",
  1362. columnProp: "enterDate",
  1363. headerAlign: "center",
  1364. align: "center",
  1365. columnLabel: "录入日期",
  1366. columnWidth: 125,
  1367. columnHidden: false,
  1368. columnImage: false,
  1369. columnSortable: false,
  1370. sortLv: 0,
  1371. status: true,
  1372. fixed: false
  1373. },
  1374. {
  1375. userId: this.$store.state.user.name,
  1376. functionId: 5301,
  1377. serialNumber: '5301ScheduleAvailResource',
  1378. tableId: "5301Schedule",
  1379. tableName: "排产明细表",
  1380. columnProp: "availResource",
  1381. headerAlign: "center",
  1382. align: "center",
  1383. columnLabel: "可用机台",
  1384. columnWidth: 80,
  1385. columnHidden: false,
  1386. columnImage: false,
  1387. columnSortable: false,
  1388. sortLv: 0,
  1389. status: true,
  1390. fixed: false
  1391. },
  1392. {
  1393. userId: this.$store.state.user.name,
  1394. functionId: 5301,
  1395. serialNumber: '5301ScheduleWorkCenterNo',
  1396. tableId: "5301Schedule",
  1397. tableName: "排产明细表",
  1398. columnProp: "workCenterNo",
  1399. headerAlign: "center",
  1400. align: "center",
  1401. columnLabel: "加工中心",
  1402. columnWidth: 80,
  1403. columnHidden: false,
  1404. columnImage: false,
  1405. columnSortable: false,
  1406. sortLv: 0,
  1407. status: true,
  1408. fixed: false
  1409. },
  1410. {
  1411. userId: this.$store.state.user.name,
  1412. functionId: 5301,
  1413. serialNumber: '5301ScheduleMachRunFactor',
  1414. tableId: "5301Schedule",
  1415. tableName: "排产明细表",
  1416. columnProp: "machRunFactor",
  1417. headerAlign: "center",
  1418. align: "center",
  1419. columnLabel: "单位产出",
  1420. columnWidth: 80,
  1421. columnHidden: false,
  1422. columnImage: false,
  1423. columnSortable: false,
  1424. sortLv: 0,
  1425. status: true,
  1426. fixed: false
  1427. },
  1428. {
  1429. userId: this.$store.state.user.name,
  1430. functionId: 5301,
  1431. serialNumber: '5301ScheduleMachSetupTime',
  1432. tableId: "5301Schedule",
  1433. tableName: "排产明细表",
  1434. columnProp: "machSetupTime",
  1435. headerAlign: "center",
  1436. align: "center",
  1437. columnLabel: "调机时间",
  1438. columnWidth: 80,
  1439. columnHidden: false,
  1440. columnImage: false,
  1441. columnSortable: false,
  1442. sortLv: 0,
  1443. status: true,
  1444. fixed: false
  1445. },
  1446. {
  1447. userId: this.$store.state.user.name,
  1448. functionId: 5301,
  1449. serialNumber: '5301ScheduleFactorUnit',
  1450. tableId: "5301Schedule",
  1451. tableName: "排产明细表",
  1452. columnProp: "factorUnit",
  1453. headerAlign: "center",
  1454. align: "center",
  1455. columnLabel: "产出单位",
  1456. columnWidth: 80,
  1457. columnHidden: false,
  1458. columnImage: false,
  1459. columnSortable: false,
  1460. sortLv: 0,
  1461. status: true,
  1462. fixed: false
  1463. },
  1464. {
  1465. userId: this.$store.state.user.name,
  1466. functionId: 5301,
  1467. serialNumber: '5301ScheduleSite',
  1468. tableId: "5301Schedule",
  1469. tableName: "排产明细表",
  1470. columnProp: "site",
  1471. headerAlign: "center",
  1472. align: "center",
  1473. columnLabel: "工厂编号",
  1474. columnWidth: 80,
  1475. columnHidden: false,
  1476. columnImage: false,
  1477. columnSortable: false,
  1478. sortLv: 0,
  1479. status: true,
  1480. fixed: false
  1481. },
  1482. {
  1483. userId: this.$store.state.user.name,
  1484. functionId: 5301,
  1485. serialNumber: '5301ScheduleSite',
  1486. tableId: "5301Schedule",
  1487. tableName: "排产明细表",
  1488. columnProp: "site",
  1489. headerAlign: "center",
  1490. align: "center",
  1491. columnLabel: "复制",
  1492. columnWidth: 80,
  1493. columnHidden: false,
  1494. columnImage: false,
  1495. columnSortable: false,
  1496. sortLv: 0,
  1497. status: true,
  1498. fixed: false
  1499. },
  1500. {
  1501. userId: this.$store.state.user.name,
  1502. functionId: 5301,
  1503. serialNumber: '5301ScheduleQtyScheduledPreOps',
  1504. tableId: "5301Schedule",
  1505. tableName: "排产明细表",
  1506. columnProp: "qtyScheduledPreOps",
  1507. headerAlign: "center",
  1508. align: "center",
  1509. columnLabel: "前道工序已排产数量",
  1510. columnWidth: 80,
  1511. columnHidden: false,
  1512. columnImage: false,
  1513. columnSortable: false,
  1514. sortLv: 0,
  1515. status: true,
  1516. fixed: false
  1517. },
  1518. {
  1519. userId: this.$store.state.user.name,
  1520. functionId: 5301,
  1521. serialNumber: '5301ScheduleDelayFlag',
  1522. tableId: "5301Schedule",
  1523. tableName: "排产明细表",
  1524. columnProp: "delayFlag",
  1525. headerAlign: "center",
  1526. align: "center",
  1527. columnLabel: "晚于发货时间",
  1528. columnWidth: 80,
  1529. columnHidden: false,
  1530. columnImage: false,
  1531. columnSortable: false,
  1532. sortLv: 0,
  1533. status: true,
  1534. fixed: false
  1535. },
  1536. {
  1537. userId: this.$store.state.user.name,
  1538. functionId: 5301,
  1539. serialNumber: '5301ScheduleRecordType',
  1540. tableId: "5301Schedule",
  1541. tableName: "排产明细表",
  1542. columnProp: "是否关闭",
  1543. headerAlign: "center",
  1544. align: "center",
  1545. columnLabel: "RecordType",
  1546. columnWidth: 80,
  1547. columnHidden: false,
  1548. columnImage: false,
  1549. columnSortable: false,
  1550. sortLv: 0,
  1551. status: true,
  1552. fixed: false
  1553. },
  1554. {
  1555. userId: this.$store.state.user.name,
  1556. functionId: 5301,
  1557. serialNumber: '5301ScheduleClosedFlag',
  1558. tableId: "5301Schedule",
  1559. tableName: "排产明细表",
  1560. columnProp: "closedFlag",
  1561. headerAlign: "center",
  1562. align: "center",
  1563. columnLabel: "是否关闭",
  1564. columnWidth: 80,
  1565. columnHidden: false,
  1566. columnImage: false,
  1567. columnSortable: false,
  1568. sortLv: 0,
  1569. status: true,
  1570. fixed: false
  1571. },
  1572. {
  1573. userId: this.$store.state.user.name,
  1574. functionId: 5301,
  1575. serialNumber: '5301ScheduleParkFlag',
  1576. tableId: "5301Schedule",
  1577. tableName: "排产明细表",
  1578. columnProp: "parkFlag",
  1579. headerAlign: "center",
  1580. align: "center",
  1581. columnLabel: "暂停",
  1582. columnWidth: 80,
  1583. columnHidden: false,
  1584. columnImage: false,
  1585. columnSortable: false,
  1586. sortLv: 0,
  1587. status: true,
  1588. fixed: false
  1589. },
  1590. {
  1591. userId: this.$store.state.user.name,
  1592. functionId: 5301,
  1593. serialNumber: '5301ScheduleTimeRequired',
  1594. tableId: "5301Schedule",
  1595. tableName: "排产明细表",
  1596. columnProp: "timeRequired",
  1597. headerAlign: "center",
  1598. align: "center",
  1599. columnLabel: "派工单需求工时",
  1600. columnWidth: 80,
  1601. columnHidden: false,
  1602. columnImage: false,
  1603. columnSortable: false,
  1604. sortLv: 0,
  1605. status: true,
  1606. fixed: false
  1607. },
  1608. {
  1609. userId: this.$store.state.user.name,
  1610. functionId: 5301,
  1611. serialNumber: '5301SchedulePreOpsPlanFinishTime',
  1612. tableId: "5301Schedule",
  1613. tableName: "排产明细表",
  1614. columnProp: "preOpsPlanFinishTime",
  1615. headerAlign: "center",
  1616. align: "center",
  1617. columnLabel: "派工单早于上工序",
  1618. columnWidth: 80,
  1619. columnHidden: false,
  1620. columnImage: false,
  1621. columnSortable: false,
  1622. sortLv: 0,
  1623. status: true,
  1624. fixed: false
  1625. },
  1626. {
  1627. userId: this.$store.state.user.name,
  1628. functionId: 5301,
  1629. serialNumber: '5301ScheduleRemark',
  1630. tableId: "5301Schedule",
  1631. tableName: "排产明细表",
  1632. columnProp: "remark",
  1633. headerAlign: "center",
  1634. align: "center",
  1635. columnLabel: "备注",
  1636. columnWidth: 80,
  1637. columnHidden: false,
  1638. columnImage: false,
  1639. columnSortable: false,
  1640. sortLv: 0,
  1641. status: true,
  1642. fixed: false
  1643. },
  1644. {
  1645. userId: this.$store.state.user.name,
  1646. functionId: 5301,
  1647. serialNumber: '5301ScheduleOriSOOrderNo',
  1648. tableId: "5301Schedule",
  1649. tableName: "排产明细表",
  1650. columnProp: "oriSOOrderNo",
  1651. headerAlign: "center",
  1652. align: "center",
  1653. columnLabel: "SAP参考号",
  1654. columnWidth: 80,
  1655. columnHidden: false,
  1656. columnImage: false,
  1657. columnSortable: false,
  1658. sortLv: 0,
  1659. status: true,
  1660. fixed: false
  1661. },
  1662. {
  1663. userId: this.$store.state.user.name,
  1664. functionId: 5301,
  1665. serialNumber: '5301ScheduleCustPartNo',
  1666. tableId: "5301Schedule",
  1667. tableName: "排产明细表",
  1668. columnProp: "custPartNo",
  1669. headerAlign: "center",
  1670. align: "center",
  1671. columnLabel: "客户产品料号",
  1672. columnWidth: 80,
  1673. columnHidden: false,
  1674. columnImage: false,
  1675. columnSortable: false,
  1676. sortLv: 0,
  1677. status: true,
  1678. fixed: false
  1679. },
  1680. {
  1681. userId: this.$store.state.user.name,
  1682. functionId: 5301,
  1683. serialNumber: '5301ScheduleEficiency',
  1684. tableId: "5301Schedule",
  1685. tableName: "排产明细表",
  1686. columnProp: "eficiency",
  1687. headerAlign: "center",
  1688. align: "center",
  1689. columnLabel: "效率",
  1690. columnWidth: 80,
  1691. columnHidden: false,
  1692. columnImage: false,
  1693. columnSortable: false,
  1694. sortLv: 0,
  1695. status: true,
  1696. fixed: false
  1697. },
  1698. {
  1699. userId: this.$store.state.user.name,
  1700. functionId: 5301,
  1701. serialNumber: '5301ScheduleDelayHours',
  1702. tableId: "5301Schedule",
  1703. tableName: "排产明细表",
  1704. columnProp: "delayHours",
  1705. headerAlign: "center",
  1706. align: "center",
  1707. columnLabel: "晚于发货时间",
  1708. columnWidth: 80,
  1709. columnHidden: false,
  1710. columnImage: false,
  1711. columnSortable: false,
  1712. sortLv: 0,
  1713. status: true,
  1714. fixed: false
  1715. },
  1716. {
  1717. userId: this.$store.state.user.name,
  1718. functionId: 5301,
  1719. serialNumber: '5301Schedule',
  1720. tableId: "5301Schedule",
  1721. tableName: "排产明细表",
  1722. columnProp: "RecordType",
  1723. headerAlign: "center",
  1724. align: "center",
  1725. columnLabel: "已排料",
  1726. columnWidth: 80,
  1727. columnHidden: false,
  1728. columnImage: false,
  1729. columnSortable: false,
  1730. sortLv: 0,
  1731. status: true,
  1732. fixed: false
  1733. },
  1734. {
  1735. userId: this.$store.state.user.name,
  1736. functionId: 5301,
  1737. serialNumber: '5301Schedule',
  1738. tableId: "5301Schedule",
  1739. tableName: "排产明细表",
  1740. columnProp: "排产完成时间早于上工序",
  1741. headerAlign: "center",
  1742. align: "center",
  1743. columnLabel: "",
  1744. columnWidth: 80,
  1745. columnHidden: false,
  1746. columnImage: false,
  1747. columnSortable: false,
  1748. sortLv: 0,
  1749. status: true,
  1750. fixed: false
  1751. }
  1752. ],
  1753. calendarOutList: [],
  1754. primaryMenuButton: {
  1755. shopOrderFlag: true,
  1756. workCalendarOutFlag: true,
  1757. batchWorkCalendarFlag: true,
  1758. splitScheduleFlag: true,
  1759. reScheduleOrderFlag: true,
  1760. partStockFlag: true,
  1761. },
  1762. detailMenuButton: {
  1763. shopOrderFlag: true,
  1764. workCalendarOutFlag: true,
  1765. changeWaitTimeFlag: true,
  1766. changeScheduleByRoutingFlag: true,
  1767. changeScheduleByCalendarFlag: true,
  1768. partStockFlag: true,
  1769. }
  1770. }
  1771. },
  1772. /*组件*/
  1773. components: {
  1774. Chooselist,/*列表的组件*/
  1775. comSplitSchedule,/* 分批排产的组件 */
  1776. comWorkCalendarOut,/*工作日历外组件*/
  1777. comBatchWorkCalendar,/*批量维护工作日历外组件*/
  1778. comPartStock,/*展示物料库存的组件*/
  1779. comChangeWaitTime,/*修改等待派工单的等待时间*/
  1780. },
  1781. mounted() {
  1782. this.$nextTick(() => {
  1783. this.height = (window.innerHeight - 405) / 2;
  1784. })
  1785. },
  1786. methods: {
  1787. /*获取机台班次信息的方法*/
  1788. getResourceShiftData() {
  1789. let queryData = {
  1790. site: this.$store.state.user.site,
  1791. workCenterNo: this.pageData.workCenterNo,
  1792. resourceId: this.pageData.resourceId,
  1793. scheduleDate: this.pageData.scheduleDate
  1794. }
  1795. getResourceRestList(queryData).then(({data}) => {
  1796. this.resourceShiftList = data.rows
  1797. this.pageData.calendarId = data.calendarRow.calendarId;
  1798. this.pageData.calendarDesc = data.calendarRow.calendarDesc;
  1799. })
  1800. },
  1801. /*获取工单信息*/
  1802. getShopOrderList() {
  1803. getShopOrderList(this.pageData).then(({data}) => {
  1804. this.shopOrderList = data.rows;
  1805. //清空已经选好的行数据
  1806. this.currentRoutingRow = null;
  1807. })
  1808. },
  1809. /*获取派工单的信息*/
  1810. getOrderScheduleList() {
  1811. getOrderScheduleList(this.pageData).then(({data}) => {
  1812. this.orderScheduleList = data.rows;
  1813. //清空已经选好的行数据
  1814. this.currentSchedlingRow = null;
  1815. //判断是否需要选中当前行
  1816. if(this.scheduleIndex >= 0){
  1817. //选中当前是的行
  1818. setTimeout(() =>{
  1819. this.$refs.scheduleTable.setCurrentRow(this.orderScheduleList[this.scheduleIndex]);
  1820. },300);
  1821. }
  1822. })
  1823. },
  1824. /*刷新页面table*/
  1825. refreshPageTables(){
  1826. this.getResourceShiftData();
  1827. this.getShopOrderList();
  1828. this.getOrderScheduleList();
  1829. },
  1830. /*列表方法的回调*/
  1831. getBaseData(val){
  1832. if (this.tagNo === 88){
  1833. this.pageData.resourceId = val.ResourceID;
  1834. //调用方法获取加工中心
  1835. this.getCurrentWorkCenterNoByResourceId();
  1836. }else if(this.tagNo == 24){
  1837. this.pageData.workCenterNo = val.WorkCenterNo;
  1838. }
  1839. },
  1840. // 获取基础数据列表
  1841. getBaseList(val){
  1842. this.tagNo = val
  1843. this.$nextTick(() => {
  1844. let strVal = "";
  1845. if (val === 88){
  1846. strVal = this.pageData.resourceId;
  1847. }else if(val === 24){
  1848. strVal = this.pageData.workCenterNo;
  1849. }
  1850. this.$refs.baseList.init(val,strVal)
  1851. })
  1852. },
  1853. /*区分不同的菜单 调用不同的方法 调用不同的方法*/
  1854. orderHandleCommand(menuName){
  1855. //区分是哪一个方法调用
  1856. if('生产工单' === menuName){
  1857. //判断是否选择好了工单
  1858. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  1859. //重置按钮
  1860. this.primaryMenuButton.shopOrderFlag = true;
  1861. //返回错误
  1862. this.$message.error('请选择工单!');
  1863. return false;
  1864. }
  1865. this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRoutingRow.orderNo)
  1866. }else if('工作日历' === menuName){
  1867. //判断是否选择好了工单
  1868. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  1869. //重置按钮
  1870. this.primaryMenuButton.workCalendarOutFlag = true;
  1871. //返回错误
  1872. this.$message.error('请选择工单!');
  1873. return false;
  1874. }
  1875. let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
  1876. 'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
  1877. //打开组件 需要的数据 展示需要的数据
  1878. this.$nextTick(() => {
  1879. this.showWorkCalendarOut = true;
  1880. this.$refs.comWorkCalendarOut.init(tempData);
  1881. })
  1882. }else if('批量维护工作日历' === menuName){
  1883. //判断是否选择好了工单
  1884. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  1885. //重置按钮
  1886. this.primaryMenuButton.workCalendarOutFlag = true;
  1887. //返回错误
  1888. this.$message.error('请选择工单!');
  1889. return false;
  1890. }
  1891. let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
  1892. 'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
  1893. //打开组件 需要的数据 展示需要的数据
  1894. this.$nextTick(() => {
  1895. this.showBatchWorkCalendar = true;
  1896. this.$refs.comBatchWorkCalendar.init(tempData);
  1897. })
  1898. }else if('分批排产' === menuName){
  1899. //判断是否选择好了工单
  1900. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  1901. //重置按钮
  1902. this.primaryMenuButton.workCalendarOutFlag = true;
  1903. //返回错误
  1904. this.$message.error('请选择工单!');
  1905. return false;
  1906. }
  1907. this.openSplitScheduleModal();
  1908. }else if('重新排产' === menuName){
  1909. //判断是否选择好了工单
  1910. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  1911. //重置按钮
  1912. this.primaryMenuButton.workCalendarOutFlag = true;
  1913. //返回错误
  1914. this.$message.error('请选择工单!');
  1915. return false;
  1916. }
  1917. //调用提示的方法
  1918. this.warnReScheduleConfirm();
  1919. }else if('查看物料库存' === menuName){
  1920. //判断是否选择好了工单
  1921. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  1922. //重置按钮
  1923. this.primaryMenuButton.partStockFlag = true;
  1924. //返回错误
  1925. this.$message.error('请选择工单!');
  1926. return false;
  1927. }
  1928. let tempData = {'site': this.pageData.site, 'orderNo': this.currentRoutingRow.orderNo};
  1929. //打开组件 需要的数据 展示需要的数据
  1930. this.$nextTick(() => {
  1931. this.showPartStockFlag = true;
  1932. this.$refs.comPartStock.init(tempData);
  1933. })
  1934. }
  1935. },
  1936. /*区分不同的菜单 调用不同的方法 调用不同的方法*/
  1937. scheduleHandleCommand(menuName){
  1938. //区分是哪一个方法调用
  1939. if('生产工单' === menuName){
  1940. //判断是否选择好了工单
  1941. if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){
  1942. //重置按钮
  1943. this.detailMenuButton.shopOrderFlag = true;
  1944. //返回错误
  1945. this.$message.error('请选择派工单!');
  1946. return false;
  1947. }
  1948. this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentSchedlingRow.orderNo)
  1949. }else if('工作日历' === menuName){
  1950. //判断是否选择好了工单
  1951. if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){
  1952. //重置按钮
  1953. this.detailMenuButton.workCalendarOutFlag = true;
  1954. //返回错误
  1955. this.$message.error('请选择派工单!');
  1956. return false;
  1957. }
  1958. let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
  1959. 'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
  1960. //打开组件 需要的数据 展示需要的数据
  1961. this.$nextTick(() => {
  1962. this.showWorkCalendarOut = true;
  1963. this.$refs.comWorkCalendarOut.init(tempData);
  1964. })
  1965. }else if('更改等待时间' === menuName){
  1966. //判断是否选择好了工单
  1967. if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){
  1968. //重置按钮
  1969. this.detailMenuButton.changeWaitTimeFlag = true;
  1970. //返回错误
  1971. this.$message.error('请选择派工单!');
  1972. return false;
  1973. }
  1974. let waitTimes = parseFloat(this.currentSchedlingRow.timeRequired) * 60;
  1975. //等待时间取整
  1976. waitTimes = parseInt(waitTimes);
  1977. let tempData = {'site': this.pageData.site, 'orderNo': this.currentSchedlingRow.orderNo,
  1978. 'itemNo': this.currentSchedlingRow.itemNo, 'seqNo': this.currentSchedlingRow.seqNo,
  1979. 'waitTimes': waitTimes};
  1980. //打开组件 需要的数据 展示需要的数据
  1981. this.$nextTick(() => {
  1982. this.showChangeWaitTime = true;
  1983. this.$refs.comChangeWaitTime.init(tempData);
  1984. })
  1985. }else if('根据工艺路线调整' === menuName){
  1986. //判断是否选择好了工单
  1987. if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){
  1988. //重置按钮
  1989. this.detailMenuButton.changeScheduleByRoutingFlag = true;
  1990. //返回错误
  1991. this.$message.error('请选择派工单!');
  1992. return false;
  1993. }
  1994. this.changeScheduleByRouting(this.currentSchedlingRow);
  1995. }else if('根据工作日历调整' === menuName){
  1996. //判断是否选择好了工单
  1997. if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){
  1998. //重置按钮
  1999. this.detailMenuButton.changeScheduleByCalendarFlag = true;
  2000. //返回错误
  2001. this.$message.error('请选择派工单!');
  2002. return false;
  2003. }
  2004. //调用提示的方法
  2005. this.warnChangeScheduleByCalendar(this.currentSchedlingRow);
  2006. }else if('查看物料库存' === menuName){
  2007. //判断是否选择好了工单
  2008. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  2009. //重置按钮
  2010. this.detailMenuButton.partStockFlag = true;
  2011. //返回错误
  2012. this.$message.error('请选择工单!');
  2013. return false;
  2014. }
  2015. let tempData = {'site': this.pageData.site, 'orderNo': this.currentSchedlingRow.orderNo};
  2016. //打开组件 需要的数据 展示需要的数据
  2017. this.$nextTick(() => {
  2018. this.showPartStockFlag = true;
  2019. this.$refs.comPartStock.init(tempData);
  2020. })
  2021. }
  2022. },
  2023. /*打开分批排产*/
  2024. openSplitScheduleModal(){
  2025. let routingRow = this.currentRoutingRow;
  2026. //首先判断是否选好
  2027. if(null == routingRow){
  2028. this.$message.error("请先单击选择行!")
  2029. return false;
  2030. }
  2031. //调用分批排产的方法
  2032. this.showSplitScheduleFlag = true;
  2033. //调用组件
  2034. this.$refs.comSplitSchedule.init(this.currentRoutingRow);
  2035. },
  2036. /*获取当前的机台对应的加工中心*/
  2037. getCurrentWorkCenterNoByResourceId(){
  2038. getCurrentWorkCenterNoByResourceId(this.pageData).then(({data}) => {
  2039. //区分是否成功
  2040. if (data.code == 500) {
  2041. //this.$message.error(data.msg);
  2042. } else{
  2043. this.pageData.workCenterNo = data.workCenterNo;
  2044. }
  2045. this.pageData.workCenterNo = data.workCenterNo;
  2046. });
  2047. },
  2048. /*设置当前行的下标*/
  2049. routingRowClassName({row, rowIndex}){
  2050. row.index = rowIndex;
  2051. //判断当前行颜色参数
  2052. if(row.qtyScheduled > 0){
  2053. return 'customer-row-gray';
  2054. }
  2055. },
  2056. /*设置工艺的行*/
  2057. setCurrentRoutingRow(row, column, event) {
  2058. this.currentRoutingRow = row;
  2059. },
  2060. /*设置当前派工单行的下标*/
  2061. scheduleRowClassName({row, rowIndex}){
  2062. row.index = rowIndex;
  2063. },
  2064. /*设置派工单的行*/
  2065. setCurrentSchedulingRow(row, column, event) {
  2066. this.currentSchedlingRow = JSON.parse(JSON.stringify(row));
  2067. //设置当前的序号
  2068. this.scheduleIndex = row.index;
  2069. },
  2070. /*当前值发生变化的时候修改*/
  2071. currentSchedulingRow(row, oldRow){
  2072. //判断是否是获取焦点的事件
  2073. if(row){
  2074. this.currentSchedlingRow = JSON.parse(JSON.stringify(row));
  2075. //设置当前的序号
  2076. this.scheduleIndex = row.index;
  2077. }
  2078. },
  2079. /*开始排产的操作*/
  2080. startScheduleOperation(row, $event, column){
  2081. //判断排产的加工中心和机台是否为空
  2082. if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
  2083. this.$message.error('加工中心不能为空!')
  2084. return false;
  2085. }
  2086. if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
  2087. this.$message.error('机台不能为空!')
  2088. return false;
  2089. }
  2090. //赋值排产的数量
  2091. let scheduledQty = row.qtyToSchedule;
  2092. row.qtyScheduled = scheduledQty;
  2093. row.qtyToSchedule = parseFloat(row.qtyToSchedule) - parseFloat(row.qtyScheduled);
  2094. this.pageData.scheduledQty = scheduledQty;
  2095. //设置工单和工序
  2096. this.pageData.orderNo = row.orderNo;
  2097. this.pageData.itemNo = row.itemNo;
  2098. //执行排产的方法
  2099. this.scheduleWorkOrderOperation(scheduledQty);
  2100. },
  2101. /*分批排产*/
  2102. initAddSplitSchedule(scheduledQty){
  2103. //设置工单和工序
  2104. this.pageData.orderNo = this.currentRoutingRow.orderNo;
  2105. this.pageData.itemNo = this.currentRoutingRow.itemNo;
  2106. //判断排产的加工中心和机台是否为空
  2107. if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
  2108. this.$message.error('加工中心不能为空!')
  2109. return false;
  2110. }
  2111. if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
  2112. this.$message.error('机台不能为空!')
  2113. return false;
  2114. }
  2115. this.currentRoutingRow.qtyScheduled = parseFloat(this.currentRoutingRow.qtyScheduled) + parseFloat(scheduledQty);
  2116. this.currentRoutingRow.qtyToSchedule = parseFloat(this.currentRoutingRow.qtyToSchedule) - parseFloat(scheduledQty);
  2117. //执行排产的方法
  2118. this.scheduleWorkOrderOperation(scheduledQty);
  2119. },
  2120. /*排产生产工单*/
  2121. scheduleWorkOrderOperation(scheduledQty){
  2122. //重置请求的参数
  2123. this.pageData.scheduledQty = scheduledQty;
  2124. scheduleWorkOrder(this.pageData).then(({data}) => {
  2125. if(data.code == 500){
  2126. this.currentRoutingRow.qtyScheduled = parseFloat(this.currentRoutingRow.qtyScheduled) - parseFloat(scheduledQty);
  2127. this.currentRoutingRow.qtyToSchedule = parseFloat(this.currentRoutingRow.qtyToSchedule) + parseFloat(scheduledQty);
  2128. this.$message.error(data.msg);
  2129. this.pageData.scheduledQty = 0;
  2130. }else{
  2131. this.$message.success(data.msg);
  2132. //刷新明细的报工页面
  2133. this.getOrderScheduleList();
  2134. }
  2135. });
  2136. },
  2137. /*提示取消派工单*/
  2138. warnCancelScheduleConfirm(row, $event, column){
  2139. //提示操作
  2140. this.$confirm('确实要取消该派工单吗?', '提示', {
  2141. confirmButtonText: '确认',
  2142. celButtonText: '取消',
  2143. type: 'warning'
  2144. }).then(() =>{
  2145. //执行创建新卷的操作
  2146. this.cancelScheduleBun(row);
  2147. });
  2148. },
  2149. /*取消派工单的操作*/
  2150. cancelScheduleBun(scheduleRow){
  2151. //设置参数
  2152. this.pageData.orderNo = scheduleRow.orderNo;
  2153. this.pageData.itemNo = scheduleRow.itemNo;
  2154. this.pageData.seqNo = scheduleRow.seqNo;
  2155. this.pageData.scheduledQty = scheduleRow.qtyRequired;
  2156. this.pageData.workCenterNo = scheduleRow.workCenterNo;
  2157. this.pageData.resourceId = scheduleRow.resourceId;
  2158. this.pageData.scheduleSeqNo = scheduleRow.scheduledSeqNo;
  2159. this.pageData.planStartTime = scheduleRow.planStartTime;
  2160. //取消排产
  2161. cancelSoSchedule(this.pageData).then(({data}) => {
  2162. if(data.code == 500){
  2163. this.$message.error(data.msg);
  2164. }else{
  2165. this.$message.success(data.msg);
  2166. //刷新排产的数据
  2167. this.getShopOrderList();
  2168. //刷新明细的数据
  2169. this.getOrderScheduleList();
  2170. }
  2171. });
  2172. },
  2173. /*分批排产*/
  2174. addWaitScheduleBun(){
  2175. //重置请求的参数
  2176. let waitTimes = this.pageData.waitTimes;
  2177. if(waitTimes <= 0){
  2178. this.$message.error('等待时间必须大于零!')
  2179. return false;
  2180. }
  2181. //发送请求
  2182. //判断排产的加工中心和机台是否为空
  2183. if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
  2184. this.$message.error('加工中心不能为空!')
  2185. return false;
  2186. }
  2187. if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
  2188. this.$message.error('机台不能为空!')
  2189. return false;
  2190. }
  2191. //执行排产的方法
  2192. this.addWaitScheduleOperation();
  2193. },
  2194. /*插入等待的派工单信息*/
  2195. addWaitScheduleOperation(){
  2196. addWaitSchedule(this.pageData).then(({data}) => {
  2197. if(data.code == 500){
  2198. this.$message.error(data.msg);
  2199. }else{
  2200. this.$message.success(data.msg);
  2201. //刷新明细
  2202. this.getOrderScheduleList();
  2203. }
  2204. });
  2205. },
  2206. /*提示取消派工单*/
  2207. warnReScheduleConfirm(){
  2208. //判断加工中心和机台
  2209. //判断排产的加工中心和机台是否为空
  2210. if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
  2211. this.$message.error('加工中心不能为空!')
  2212. return false;
  2213. }
  2214. if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
  2215. this.$message.error('机台不能为空!')
  2216. return false;
  2217. }
  2218. //提示操作
  2219. this.$confirm('确实要对排产清单中的未完成派工单进行排产吗?', '提示', {
  2220. confirmButtonText: '确认',
  2221. celButtonText: '取消',
  2222. type: 'warning'
  2223. }).then(() =>{
  2224. //执行创建新卷的操作
  2225. this.initReScheduleWorkOrders();
  2226. });
  2227. },
  2228. /*重新排产的方法*/
  2229. initReScheduleWorkOrders(){
  2230. reScheduleWorkOrders(this.pageData).then(({data}) => {
  2231. if(data.code == 500){
  2232. this.$message.error(data.msg);
  2233. }else{
  2234. this.$message.success(data.msg);
  2235. //刷新明细的报工页面
  2236. this.getOrderScheduleList();
  2237. }
  2238. });
  2239. },
  2240. /*上移派工单*/
  2241. moveUpScheduleBun(){
  2242. //判断是否选择好了移动的行
  2243. let scheduleRow = this.currentSchedlingRow;
  2244. if(null == scheduleRow || scheduleRow == ''){
  2245. this.$message.error('请先选择处理的行!');
  2246. return false;
  2247. }
  2248. //判断是否是第一行
  2249. if(scheduleRow.index == 0){
  2250. this.$message.error('已经是首行,无法继续上行!');
  2251. return false;
  2252. }
  2253. debugger;
  2254. //请求的参数
  2255. let requestData = {'site': this.pageData.site,
  2256. 'workCenterNo': this.pageData.workCenterNo,
  2257. 'resourceId': this.pageData.resourceId,
  2258. 'scheduleSeqNo': scheduleRow.scheduledSeqNo};
  2259. //请求处理当前的参数
  2260. moveUpSchedule(requestData).then(({data}) => {
  2261. if(data.code == 500){
  2262. this.$message.error(data.msg);
  2263. }else{
  2264. this.$message.success(data.msg);
  2265. //重置当前行
  2266. this.scheduleIndex = this.scheduleIndex - 1;
  2267. //刷新派工单的数据
  2268. this.getOrderScheduleList();
  2269. }
  2270. });
  2271. },
  2272. /*上移派工单*/
  2273. moveDownScheduleBun(){
  2274. //判断是否选择好了移动的行
  2275. let scheduleRow = this.currentSchedlingRow;
  2276. if(null == scheduleRow || scheduleRow == ''){
  2277. this.$message.error('请先选择处理的行!');
  2278. return false;
  2279. }
  2280. let countNums = this.orderScheduleList.length;
  2281. //判断是否是第一行
  2282. if(scheduleRow.index == countNums - 1){
  2283. this.$message.error('已经是末行,无法继续下行!');
  2284. return false;
  2285. }
  2286. //请求的参数
  2287. let requestData = {'site': this.pageData.site,
  2288. 'workCenterNo': this.pageData.workCenterNo,
  2289. 'resourceId': this.pageData.resourceId,
  2290. 'scheduleSeqNo': scheduleRow.scheduledSeqNo};
  2291. //请求处理当前的参数
  2292. moveDownSchedule(requestData).then(({data}) => {
  2293. if(data.code == 500){
  2294. this.$message.error(data.msg);
  2295. }else{
  2296. this.$message.success(data.msg);
  2297. //重置当前行
  2298. this.scheduleIndex = this.scheduleIndex + 1;
  2299. //刷新派工单的数据
  2300. this.getOrderScheduleList();
  2301. }
  2302. });
  2303. },
  2304. /*判断主菜单的样式*/
  2305. controlPrimaryMenuBun(){
  2306. //没有选择行 所有的按钮都是灰色
  2307. if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
  2308. this.primaryMenuButton.shopOrderFlag = true;
  2309. this.primaryMenuButton.workCalendarOutFlag = true;
  2310. this.primaryMenuButton.batchWorkCalendarFlag = true;
  2311. this.primaryMenuButton.splitScheduleFlag = true;
  2312. this.primaryMenuButton.reScheduleOrderFlag = true;
  2313. this.primaryMenuButton.partStockFlag = true;
  2314. }else{
  2315. this.primaryMenuButton.shopOrderFlag = false;
  2316. this.primaryMenuButton.workCalendarOutFlag = false;
  2317. this.primaryMenuButton.batchWorkCalendarFlag = false;
  2318. this.primaryMenuButton.splitScheduleFlag = false;
  2319. this.primaryMenuButton.reScheduleOrderFlag = false;
  2320. this.primaryMenuButton.partStockFlag = false;
  2321. }
  2322. },
  2323. /*控制明细菜单是否显示*/
  2324. controlDetailMenuBun(){
  2325. //没有选择行 所有的按钮都是灰色
  2326. if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){
  2327. this.detailMenuButton.shopOrderFlag = true;
  2328. this.detailMenuButton.workCalendarOutFlag = true;
  2329. this.detailMenuButton.changeWaitTimeFlag = true;
  2330. this.detailMenuButton.changeScheduleByRoutingFlag = true;
  2331. this.detailMenuButton.changeScheduleByCalendarFlag = true;
  2332. this.detailMenuButton.partStockFlag = true;
  2333. }else{
  2334. this.detailMenuButton.shopOrderFlag = false;
  2335. this.detailMenuButton.workCalendarOutFlag = false;
  2336. //需要判断是否是等待工单(只有等待工单才可以修改时间)
  2337. if(this.currentSchedlingRow.orderNo === '9999'){
  2338. this.detailMenuButton.changeWaitTimeFlag = false;
  2339. }else{
  2340. this.detailMenuButton.changeWaitTimeFlag = true;
  2341. }
  2342. this.detailMenuButton.changeScheduleByRoutingFlag = false;
  2343. this.detailMenuButton.changeScheduleByCalendarFlag = false;
  2344. this.detailMenuButton.partStockFlag = false;
  2345. }
  2346. },
  2347. /*调整等待派工单的等待时间*/
  2348. changeScheduleWaitTimes(tempData){
  2349. //修改当前等待派工单的等待时间
  2350. let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
  2351. 'seqNo': tempData.seqNo, 'waitTimes': tempData.waitTimes, 'workCenterNo': this.pageData.workCenterNo,
  2352. 'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo};
  2353. updateScheduleWaitTimes(requestData).then(({data}) => {
  2354. if(data.code != 200){
  2355. this.$message.error(data.msg);
  2356. }else{
  2357. this.$message.success(data.msg);
  2358. //刷新派工单的数据
  2359. this.getOrderScheduleList();
  2360. }
  2361. });
  2362. },
  2363. /*根据工艺路线调整派工单*/
  2364. changeScheduleByRouting(tempData){
  2365. //修改当前等待派工单的等待时间
  2366. let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
  2367. 'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo,
  2368. 'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo};
  2369. refreshScheduleByRouting(requestData).then(({data}) => {
  2370. if(data.code != 500){
  2371. this.$message.error(data.msg);
  2372. }else{
  2373. this.$message.success(data.msg);
  2374. //刷新派工单的数据
  2375. this.getOrderScheduleList();
  2376. }
  2377. });
  2378. },
  2379. /*提示是否按照工作日历调整派工单*/
  2380. warnChangeScheduleByCalendar(scheduleRow){
  2381. //提示操作
  2382. this.$confirm('确实要要从该派工单开始,根据工作日历调整排产吗?', '提示', {
  2383. confirmButtonText: '确认',
  2384. celButtonText: '取消',
  2385. type: 'warning'
  2386. }).then(() =>{
  2387. //执行创建新卷的操作
  2388. this.changeScheduleByCalendar(scheduleRow);
  2389. });
  2390. },
  2391. /*根据日历调整派工单*/
  2392. changeScheduleByCalendar(tempData){
  2393. //修改当前等待派工单的等待时间
  2394. let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
  2395. 'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo,
  2396. 'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo};
  2397. refreshScheduleByCalendar(requestData).then(({data}) => {
  2398. if(data.code == 500){
  2399. this.$message.error(data.msg);
  2400. }else{
  2401. this.$message.success(data.msg);
  2402. //刷新派工单的数据
  2403. this.getOrderScheduleList();
  2404. }
  2405. });
  2406. },
  2407. },
  2408. created() {
  2409. //执行查询休息时间数据
  2410. this.getResourceShiftData();
  2411. //查询工单的数据
  2412. this.getShopOrderList();
  2413. //查询派工的数据
  2414. this.getOrderScheduleList();
  2415. }
  2416. }
  2417. </script>
  2418. <!--当前页面的标签样式-->
  2419. <style scoped lang="scss">
  2420. /*针对el-card*/
  2421. .customer-card .el-form-item__content{
  2422. margin-top: -15px;
  2423. }
  2424. .customer-card .el-form-item{
  2425. height: 22px;
  2426. }
  2427. .customer-border .el-form-item__content{
  2428. margin-top: -30px;
  2429. }
  2430. /*全局年与日类型 宽度*/
  2431. div.el-time-width{
  2432. width: 110px !important;
  2433. }
  2434. /* 全局时间右边框*/
  2435. .customer-css input.el-input__inner{
  2436. height: 22px !important;
  2437. padding-right: 0px !important;
  2438. }
  2439. /* 控制el-card标签的数据*/
  2440. div.customer-el-card {
  2441. margin-left: 110px;
  2442. margin-top: -15px;
  2443. height: 20px;
  2444. width: 60px;
  2445. }
  2446. /* 颜色控制 */
  2447. div.customer-el-card-pink {
  2448. background: #FF00FF;
  2449. }
  2450. div.customer-el-card-orange {
  2451. background: #FFD700;
  2452. }
  2453. div.customer-el-card-blue {
  2454. background: #0000CD;
  2455. }
  2456. /*清掉样式*/
  2457. .el-radio+.el-radio {
  2458. margin-left: 0px;
  2459. }
  2460. /*当前按钮的通用样式*/
  2461. .customer-css .customer-bun-mid{
  2462. width: 60px;
  2463. text-align: center;
  2464. }
  2465. .customer-css .customer-bun-min{
  2466. width: 50px;
  2467. text-align: center;
  2468. }
  2469. .customer-css .customer-bun-max{
  2470. width: 80px;
  2471. text-align: center;
  2472. }
  2473. /*当前按钮的通用样式*/
  2474. .customer-css .el-button--medium {
  2475. padding: 5px 5px;
  2476. }
  2477. /*灰色的表格行背景颜色*/
  2478. .customer-css /deep/ tr.customer-row-gray{
  2479. background: #7e819e;
  2480. }
  2481. /*去掉悬浮的样式*/
  2482. .customer-css /deep/ tr:hover > td{
  2483. background-color: transparent !important;
  2484. }
  2485. .customer-css /deep/ tr.hover-row.current-row > td{
  2486. background-color: transparent !important;
  2487. }
  2488. .customer-css /deep/ tr.hover-row > td{
  2489. background-color: transparent !important;
  2490. }
  2491. /*添加主菜单和明细菜单的样式*/
  2492. .customer-css .customer-dropdown .el-button--primary{
  2493. padding: 2px;
  2494. font-size: 12px;
  2495. }
  2496. /*设置间距*/
  2497. .el-dropdown-menu /deep/ li.customer-li{
  2498. font-size: 12px;
  2499. line-height: 16px;
  2500. padding: 4px 8px;
  2501. }
  2502. .el-input /deep/ .el-icon-time{
  2503. display: none;
  2504. }
  2505. /*控制上下间距*/
  2506. </style>