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.

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