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.

3085 lines
104 KiB

1 year ago
  1. 4<template>
  2. <div class="mod-config yzz">
  3. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  4. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  5. <el-form-item :label="'申请单号'">
  6. <el-input v-model="searchData.notifyNo" style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'申请账号'">
  9. <el-input v-model="searchData.userName" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item label="状态" >
  12. <el-select v-model="searchData.status" placeholder="请选择" style="width: 120px">
  13. <el-option label="全部" value=""></el-option>
  14. <el-option label="已下达" value="已下达"></el-option>
  15. <el-option label="已关闭" value="已关闭"></el-option>
  16. </el-select>
  17. </el-form-item>
  18. <el-form-item :label="'申请单日期'">
  19. <el-date-picker
  20. style="width: 120px"
  21. v-model="searchData.startDate"
  22. type="date"
  23. value-format="yyyy-MM-dd"
  24. placeholder="选择日期">
  25. </el-date-picker>
  26. </el-form-item>
  27. <el-form-item style="margin-top: 23px;">
  28. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  29. </el-form-item>
  30. <el-form-item :label="' '">
  31. <el-date-picker
  32. style="width: 120px"
  33. v-model="searchData.endDate"
  34. type="date"
  35. value-format="yyyy-MM-dd"
  36. placeholder="选择日期">
  37. </el-date-picker>
  38. </el-form-item>
  39. </el-form>
  40. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  41. <el-form-item label="是否领料" >
  42. <el-select v-model="searchData.issueFlag" placeholder="请选择" style="width: 120px">
  43. <el-option label="全部" value=""></el-option>
  44. <el-option label="Y" value="Y"></el-option>
  45. <el-option label="N" value="N"></el-option>
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item label="领料结果" >
  49. <el-select v-model="searchData.issueResult" placeholder="请选择" style="width: 120px">
  50. <el-option label="全部" value=""></el-option>
  51. <el-option label="部分发料" value="部分发料"></el-option>
  52. <el-option label="全部发料" value="全部发料"></el-option>
  53. </el-select>
  54. </el-form-item>
  55. <el-form-item :label="' '">
  56. <el-button type="primary" @click="searchTable()">查询</el-button>
  57. <!-- <el-button type="primary" @click="createNotifyModal()">新增</el-button> -->
  58. <download-excel
  59. :fields="fields()"
  60. :data="exportData"
  61. type="xls"
  62. :name="exportName"
  63. :header="exportHeader"
  64. :footer="exportFooter"
  65. :fetch="createExportData"
  66. :before-generate="startDownload"
  67. :before-finish="finishDownload"
  68. worksheet="导出信息"
  69. class="el-button el-button--primary el-button--medium">
  70. {{ '导出' }}
  71. </download-excel>
  72. </el-form-item>
  73. </el-form>
  74. </el-form>
  75. <el-table
  76. :data="dataList"
  77. @row-click="changeData"
  78. :height="height"
  79. border
  80. highlight-current-row
  81. ref="mainTable"
  82. v-loading="dataListLoading"
  83. style="width: 100%; ">
  84. <el-table-column
  85. v-for="(item,index) in columnList1" :key="index"
  86. :sortable="item.columnSortable"
  87. :prop="item.columnProp"
  88. :header-align="item.headerAlign"
  89. :show-overflow-tooltip="item.showOverflowTooltip"
  90. :align="item.align"
  91. :fixed="item.fixed==''?false:item.fixed"
  92. :min-width="item.columnWidth"
  93. :label="item.columnLabel">
  94. <template slot-scope="scope">
  95. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  96. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  97. style="width: 100px; height: 80px"/></span>
  98. </template>
  99. </el-table-column>
  100. <el-table-column
  101. header-align="center"
  102. align="center"
  103. width="80"
  104. label="操作">
  105. <template slot-scope="scope">
  106. <a type="text" size="small" v-if="scope.row.status==='已下达'" @click="closeNotifyModel(scope.row)">关闭</a>
  107. <a type="text" size="small" v-if="scope.row.status==='已关闭'" @click="openNotify(scope.row)">开启</a>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. <el-pagination
  112. @size-change="sizeChangeHandle"
  113. @current-change="currentChangeHandle"
  114. :current-page="pageIndex"
  115. :page-sizes="[20, 50, 100, 1000]"
  116. :page-size="pageSize"
  117. :total="totalPage"
  118. layout="total, sizes, prev, pager, next, jumper">
  119. </el-pagination>
  120. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  121. <el-tab-pane label="申请单明细" name="detail">
  122. <!-- <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;">
  123. <el-button @click="createOrderDetail()" type="primary" style="margin-left: 10px;margin-top: 0px">{{'新增'}}
  124. </el-button>
  125. <el-button @click="editOrderDetail()" type="primary" style="margin-left: 10px;margin-top: 0px">{{'编辑'}}
  126. </el-button>
  127. </el-form> -->
  128. <el-table
  129. :data="dataList2"
  130. :height="height"
  131. border
  132. v-loading="dataListLoading"
  133. style="width: 100%; ">
  134. <el-table-column
  135. header-align="center"
  136. align="center"
  137. width="80"
  138. label="操作">
  139. <template slot-scope="scope">
  140. <a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifySOSPlus(scope.row)">删除</a>
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. v-for="(item,index) in columnList2" :key="index"
  145. :sortable="item.columnSortable"
  146. :prop="item.columnProp"
  147. :header-align="item.headerAlign"
  148. :show-overflow-tooltip="item.showOverflowTooltip"
  149. :align="item.align"
  150. :fixed="item.fixed==''?false:item.fixed"
  151. :min-width="item.columnWidth"
  152. :label="item.columnLabel">
  153. <template slot-scope="scope">
  154. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  155. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  156. style="width: 100px; height: 80px"/></span>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. </el-tab-pane>
  161. <el-tab-pane label="材料明细" name="sub">
  162. <el-table
  163. :data="dataList3"
  164. :height="height"
  165. border
  166. :row-class-name="tableRowClassName"
  167. v-loading="dataListLoading"
  168. style="width: 100%; ">
  169. <!-- <el-table-column-->
  170. <!-- header-align="center"-->
  171. <!-- align="center"-->
  172. <!-- width="80"-->
  173. <!-- fixed="left"-->
  174. <!-- label="操作">-->
  175. <!-- <template slot-scope="scope">-->
  176. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  177. <!-- </template>-->
  178. <!-- </el-table-column>-->
  179. <el-table-column
  180. header-align="center"
  181. align="center"
  182. width="80"
  183. label="操作">
  184. <template slot-scope="scope">
  185. <a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a>
  186. </template>
  187. </el-table-column>
  188. <el-table-column
  189. v-for="(item,index) in columnList3" :key="index"
  190. :sortable="item.columnSortable"
  191. :prop="item.columnProp"
  192. :header-align="item.headerAlign"
  193. :show-overflow-tooltip="item.showOverflowTooltip"
  194. :align="item.align"
  195. :fixed="item.fixed==''?false:item.fixed"
  196. :min-width="item.columnWidth"
  197. :label="item.columnLabel">
  198. <template slot-scope="scope">
  199. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  200. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  201. style="width: 100px; height: 80px"/></span>
  202. </template>
  203. </el-table-column>
  204. </el-table>
  205. </el-tab-pane>
  206. <el-tab-pane label="材料汇总" name="sum">
  207. <el-table
  208. :data="dataList4"
  209. :height="height"
  210. border
  211. v-loading="dataListLoading"
  212. style="width: 100%; ">
  213. <!-- <el-table-column-->
  214. <!-- header-align="center"-->
  215. <!-- align="center"-->
  216. <!-- width="80"-->
  217. <!-- fixed="left"-->
  218. <!-- label="操作">-->
  219. <!-- <template slot-scope="scope">-->
  220. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  221. <!-- </template>-->
  222. <!-- </el-table-column>-->
  223. <el-table-column
  224. v-for="(item,index) in columnList4" :key="index"
  225. :sortable="item.columnSortable"
  226. :prop="item.columnProp"
  227. :header-align="item.headerAlign"
  228. :show-overflow-tooltip="item.showOverflowTooltip"
  229. :align="item.align"
  230. :fixed="item.fixed==''?false:item.fixed"
  231. :min-width="item.columnWidth"
  232. :label="item.columnLabel">
  233. <template slot-scope="scope">
  234. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  235. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  236. style="width: 100px; height: 80px"/></span>
  237. </template>
  238. </el-table-column>
  239. </el-table>
  240. </el-tab-pane>
  241. <el-tab-pane label="删除记录" name="change">
  242. <el-table
  243. :data="dataList5"
  244. :height="height"
  245. border
  246. v-loading="dataListLoading"
  247. style="width: 100%; ">
  248. <!-- <el-table-column-->
  249. <!-- header-align="center"-->
  250. <!-- align="center"-->
  251. <!-- width="80"-->
  252. <!-- fixed="left"-->
  253. <!-- label="操作">-->
  254. <!-- <template slot-scope="scope">-->
  255. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  256. <!-- </template>-->
  257. <!-- </el-table-column>-->
  258. <el-table-column
  259. v-for="(item,index) in columnList5" :key="index"
  260. :sortable="item.columnSortable"
  261. :prop="item.columnProp"
  262. :header-align="item.headerAlign"
  263. :show-overflow-tooltip="item.showOverflowTooltip"
  264. :align="item.align"
  265. :fixed="item.fixed==''?false:item.fixed"
  266. :min-width="item.columnWidth"
  267. :label="item.columnLabel">
  268. <template slot-scope="scope">
  269. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  270. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  271. style="width: 100px; height: 80px"/></span>
  272. </template>
  273. </el-table-column>
  274. </el-table>
  275. </el-tab-pane>
  276. <el-tab-pane label="关闭记录" name="close">
  277. <el-table
  278. :data="dataList6"
  279. :height="height"
  280. border
  281. v-loading="dataListLoading"
  282. style="width: 100%; ">
  283. <!-- <el-table-column-->
  284. <!-- header-align="center"-->
  285. <!-- align="center"-->
  286. <!-- width="80"-->
  287. <!-- fixed="left"-->
  288. <!-- label="操作">-->
  289. <!-- <template slot-scope="scope">-->
  290. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  291. <!-- </template>-->
  292. <!-- </el-table-column>-->
  293. <el-table-column
  294. v-for="(item,index) in columnList6" :key="index"
  295. :sortable="item.columnSortable"
  296. :prop="item.columnProp"
  297. :header-align="item.headerAlign"
  298. :show-overflow-tooltip="item.showOverflowTooltip"
  299. :align="item.align"
  300. :fixed="item.fixed==''?false:item.fixed"
  301. :min-width="item.columnWidth"
  302. :label="item.columnLabel">
  303. <template slot-scope="scope">
  304. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  305. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  306. style="width: 100px; height: 80px"/></span>
  307. </template>
  308. </el-table-column>
  309. </el-table>
  310. </el-tab-pane>
  311. </el-tabs>
  312. <el-dialog title="关闭原因" :close-on-click-modal="false" v-drag :visible.sync="closeModalFlag" width="450px">
  313. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  314. <el-row :gutter="20">
  315. <el-col :span="24">
  316. <el-form-item >
  317. <el-input
  318. type="textarea"
  319. v-model="closeData.closeRemark "
  320. :rows="3"
  321. resize='none'
  322. maxlength="200"
  323. show-word-limit
  324. style="height: 60px" >
  325. </el-input>
  326. </el-form-item>
  327. </el-col>
  328. </el-row>
  329. </el-form>
  330. <el-footer style="height:40px;margin-top: 60px;text-align:center">
  331. <el-button type="primary" @click="closeNotify()">保存</el-button>
  332. <el-button type="primary" @click="closeModalFlag=false">关闭</el-button>
  333. </el-footer>
  334. </el-dialog>
  335. <el-dialog title="新建领料申请单" :close-on-click-modal="false" v-drag :visible.sync="createNotifyFlag" width="300px">
  336. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  337. <el-row :gutter="20">
  338. <el-col :span="24">
  339. <el-form-item :label="'工厂_BU'" style="width: 97%" >
  340. <el-select v-model="notifyData.bu" placeholder="请选择" style="width: 100%">
  341. <el-option
  342. v-for = "i in userBuList"
  343. :key = "i.buNo"
  344. :label = "i.sitename"
  345. :value = "i.buNo">
  346. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  347. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  348. {{ i.buDesc }}
  349. </span>
  350. </el-option>
  351. </el-select>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="12">
  355. <el-form-item :label="'是否是委外'" style="width: 97%">
  356. <el-radio-group v-model="notifyData.outWorkOrderFlag">
  357. <el-radio :label="true" ></el-radio>
  358. <el-radio :label="false" ></el-radio>
  359. </el-radio-group>
  360. </el-form-item>
  361. </el-col>
  362. </el-row>
  363. <el-row :gutter="20">
  364. <el-col :span="24">
  365. <el-form-item :label="'备注'" style="width: 97%">
  366. <el-input type="textarea" v-model="notifyData.remark" style="width: 100%"></el-input>
  367. </el-form-item>
  368. </el-col>
  369. </el-row>
  370. </el-form>
  371. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  372. <el-button type="primary" @click="saveNotify()">保存</el-button>
  373. <el-button type="primary" @click="createNotifyFlag=false">关闭</el-button>
  374. </el-footer>
  375. </el-dialog>
  376. <!-- 选择物料模态框 -->
  377. <el-dialog
  378. width="600px"
  379. title="选择物料"
  380. :close-on-click-modal="false"
  381. :visible.sync="choosePartModalFlag">
  382. <el-form :inline="true" label-position="top" label-width="100px">
  383. <el-row :gutter="20">
  384. <el-col :span="6">
  385. <el-form-item style="margin-left: 0px" label="物料编码">
  386. <el-input v-model="choosePartData.partNo"></el-input>
  387. </el-form-item>
  388. </el-col>
  389. <el-col :span="6">
  390. <el-form-item style="margin-left: 0px" label="物料名称">
  391. <el-input v-model="choosePartData.partDesc"></el-input>
  392. </el-form-item>
  393. </el-col>
  394. <el-col :span="6">
  395. <el-form-item style="margin-left: 0px" label="规格型号">
  396. <el-input v-model="choosePartData.spec"></el-input>
  397. </el-form-item>
  398. </el-col>
  399. <el-col :span="6">
  400. <el-form-item label=" ">
  401. <el-button type="primary" @click="searchPartModel">查询</el-button>
  402. </el-form-item>
  403. </el-col>
  404. </el-row>
  405. </el-form>
  406. <el-table
  407. height="450"
  408. :data="choosePartList"
  409. border
  410. @row-dblclick="choosePart"
  411. style="width: 100%;">
  412. <el-table-column
  413. prop="partNo"
  414. header-align="center"
  415. align="left"
  416. min-width="80"
  417. label="物料编码">
  418. </el-table-column>
  419. <el-table-column
  420. prop="partDesc"
  421. header-align="center"
  422. align="left"
  423. min-width="120"
  424. label="物料描述">
  425. </el-table-column>
  426. <el-table-column
  427. prop="spec"
  428. header-align="center"
  429. align="left"
  430. min-width="120"
  431. label="规格型号">
  432. </el-table-column>
  433. <el-table-column
  434. prop="sku"
  435. header-align="center"
  436. align="left"
  437. min-width="80"
  438. label="SKU">
  439. </el-table-column>
  440. <el-table-column
  441. prop="umid"
  442. header-align="center"
  443. align="left"
  444. min-width="60"
  445. label="计量单位">
  446. </el-table-column>
  447. </el-table>
  448. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  449. <el-button type="primary" @click="choosePartModalFlag=false">关闭</el-button>
  450. </el-footer>
  451. </el-dialog>
  452. <el-dialog title="选择派工单" :close-on-click-modal="false" v-drag :visible.sync="chooseSOSModalFlag" width="1000px">
  453. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  454. <el-row :gutter="20">
  455. <el-col :span="4">
  456. <el-form-item :label="'生产订单'" >
  457. <el-input v-model="chooseSOSData.orderno" ></el-input>
  458. </el-form-item>
  459. </el-col>
  460. <el-col :span="4">
  461. <el-form-item :label="'派工单号'" >
  462. <el-input v-model="chooseSOSData.seqno" ></el-input>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="4">
  466. <el-form-item :label="'机台'" >
  467. <el-input v-model="chooseSOSData.sResourceid" ></el-input>
  468. </el-form-item>
  469. </el-col>
  470. <el-col :span="4">
  471. <el-form-item :label="'派工日期'" >
  472. <el-date-picker
  473. style="width: 100%"
  474. v-model="chooseSOSData.startDate"
  475. type="date"
  476. value-format="yyyy-MM-dd"
  477. placeholder="选择日期">
  478. </el-date-picker>
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="4">
  482. <el-form-item :label="'到'" >
  483. <el-date-picker
  484. style="width: 100%"
  485. v-model="chooseSOSData.endDate"
  486. type="date"
  487. value-format="yyyy-MM-dd"
  488. placeholder="选择日期">
  489. </el-date-picker>
  490. </el-form-item>
  491. </el-col>
  492. </el-row>
  493. <el-row :gutter="20">
  494. <el-col :span="6">
  495. <el-form-item >
  496. <el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="">查询</el-button>
  497. </el-form-item>
  498. </el-col>
  499. </el-row>
  500. </el-form>
  501. <el-table
  502. :height="400"
  503. :data="chooseSOSList"
  504. border
  505. style="width: 100%;">
  506. <el-table-column
  507. v-for="(item,index) in chooseSOSColumnList" :key="index"
  508. :sortable="item.columnSortable"
  509. :prop="item.columnProp"
  510. :header-align="item.headerAlign"
  511. :show-overflow-tooltip="item.showOverflowTooltip"
  512. :align="item.align"
  513. :fixed="item.fixed==''?false:item.fixed"
  514. :min-width="item.columnWidth"
  515. :label="item.columnLabel">
  516. <template slot-scope="scope">
  517. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  518. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  519. </template>
  520. </el-table-column>
  521. <el-table-column
  522. fixed="left"
  523. header-align="center"
  524. align="center"
  525. width="60"
  526. label="操作">
  527. <template slot-scope="scope">
  528. <a type="text" size="small" @click="chooseSOS(scope.row)">选择</a>
  529. </template>
  530. </el-table-column>
  531. </el-table>
  532. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  533. <el-button type="primary" @click="chooseSOSModalFlag = false">关闭</el-button>
  534. </el-footer>
  535. </el-dialog>
  536. <el-dialog title="选择工单" :close-on-click-modal="false" v-drag :visible.sync="chooseOrderModalFlag" width="1000px">
  537. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  538. <el-row :gutter="20">
  539. <el-col :span="6">
  540. <el-form-item :label="'生产订单'" >
  541. <el-input v-model="chooseOrderData.orderNo"></el-input>
  542. </el-form-item>
  543. </el-col>
  544. <el-col :span="6">
  545. <el-form-item :label="'工单状态'" >
  546. <el-select v-model="chooseOrderData.statusList" multiple style="width: 100%" class="single-line-multi-select">
  547. <el-option label="全部" value=""></el-option>
  548. <el-option label="已停工" value="已停工"></el-option>
  549. <el-option label="已开工" value="已开工"></el-option>
  550. <el-option label="已取消" value="已取消"></el-option>
  551. <el-option label="已计划" value="已计划"></el-option>
  552. <el-option label="已排产" value="已排产"></el-option>
  553. <el-option label="已下达" value="已下达"></el-option>
  554. <el-option label="已关闭" value="已关闭"></el-option>
  555. </el-select>
  556. </el-form-item>
  557. </el-col>
  558. <el-col :span="6">
  559. <el-form-item :label="'开始日期'" >
  560. <el-date-picker
  561. style="width: 100%"
  562. v-model="chooseOrderData.date3"
  563. type="date"
  564. value-format="yyyy-MM-dd"
  565. placeholder="选择日期">
  566. </el-date-picker>
  567. </el-form-item>
  568. </el-col>
  569. <el-col :span="6">
  570. <el-form-item :label="'结束日期'" >
  571. <el-date-picker
  572. style="width: 100%"
  573. v-model="chooseOrderData.date4"
  574. type="date"
  575. value-format="yyyy-MM-dd"
  576. placeholder="选择日期">
  577. </el-date-picker>
  578. </el-form-item>
  579. </el-col>
  580. </el-row>
  581. <el-row :gutter="20">
  582. <el-col :span="6">
  583. <el-form-item >
  584. <el-button type="primary" @click="searchOrder()" style="margin-top: 5px" class="">查询</el-button>
  585. </el-form-item>
  586. </el-col>
  587. </el-row>
  588. </el-form>
  589. <el-table
  590. :height="400"
  591. :data="chooseOrderList"
  592. border
  593. style="width: 100%;">
  594. <el-table-column
  595. v-for="(item,index) in chooseOrderColumnList" :key="index"
  596. :sortable="item.columnSortable"
  597. :prop="item.columnProp"
  598. :header-align="item.headerAlign"
  599. :show-overflow-tooltip="item.showOverflowTooltip"
  600. :align="item.align"
  601. :fixed="item.fixed==''?false:item.fixed"
  602. :min-width="item.columnWidth"
  603. :label="item.columnLabel">
  604. <template slot-scope="scope">
  605. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  606. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  607. </template>
  608. </el-table-column>
  609. <el-table-column
  610. fixed="left"
  611. header-align="center"
  612. align="center"
  613. width="60"
  614. label="操作">
  615. <template slot-scope="scope">
  616. <a type="text" size="small" @click="chooseOrder(scope.row)">选择</a>
  617. </template>
  618. </el-table-column>
  619. </el-table>
  620. <el-pagination
  621. @size-change="coSizeChangeHandle"
  622. @current-change="co_currentChangeHandle"
  623. :current-page="co_pageIndex"
  624. :page-sizes="[20, 50, 100, 1000]"
  625. :page-size="co_pageSize"
  626. :total="co_totalPage"
  627. layout="total, sizes, prev, pager, next, jumper">
  628. </el-pagination>
  629. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  630. <el-button type="primary" @click="chooseOrderModalFlag = false">关闭</el-button>
  631. </el-footer>
  632. </el-dialog>
  633. <el-dialog title="选择工序" :close-on-click-modal="false" v-drag :visible.sync="chooseOperationModalFlag" width="800px">
  634. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  635. <el-row :gutter="20">
  636. <el-col :span="6">
  637. <el-form-item :label="'工序名称'" >
  638. <el-input v-model="chooseOperationData.itemDesc"></el-input>
  639. </el-form-item>
  640. </el-col>
  641. <el-col :span="6">
  642. <el-form-item >
  643. <el-button type="primary" @click="searchOperation()" style="margin-top: 5px" class="">查询</el-button>
  644. </el-form-item>
  645. </el-col>
  646. </el-row>
  647. </el-form>
  648. <el-table
  649. :height="400"
  650. :data="chooseOperationList"
  651. border
  652. style="width: 100%;">
  653. <el-table-column
  654. v-for="(item,index) in chooseOperationColumnList" :key="index"
  655. :sortable="item.columnSortable"
  656. :prop="item.columnProp"
  657. :header-align="item.headerAlign"
  658. :show-overflow-tooltip="item.showOverflowTooltip"
  659. :align="item.align"
  660. :fixed="item.fixed==''?false:item.fixed"
  661. :min-width="item.columnWidth"
  662. :label="item.columnLabel">
  663. <template slot-scope="scope">
  664. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  665. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  666. </template>
  667. </el-table-column>
  668. <el-table-column
  669. fixed="left"
  670. header-align="center"
  671. align="center"
  672. width="60"
  673. label="操作">
  674. <template slot-scope="scope">
  675. <a type="text" size="small" @click="chooseOperation(scope.row)">选择</a>
  676. </template>
  677. </el-table-column>
  678. </el-table>
  679. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  680. <el-button type="primary" @click="chooseOperationModalFlag = false">关闭</el-button>
  681. </el-footer>
  682. </el-dialog>
  683. <el-dialog title="选择机台" :close-on-click-modal="false" v-drag :visible.sync="chooseResourceModalFlag" width="800px">
  684. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  685. <el-row :gutter="20">
  686. <el-col :span="6">
  687. <el-form-item :label="'机台编号'" >
  688. <el-input v-model="chooseResourceData.resourceId"></el-input>
  689. </el-form-item>
  690. </el-col>
  691. <el-col :span="6">
  692. <el-form-item :label="'机台描述'" >
  693. <el-input v-model="chooseResourceData.resourceDesc"></el-input>
  694. </el-form-item>
  695. </el-col>
  696. <el-col :span="6">
  697. <el-form-item >
  698. <el-button type="primary" @click="searchResource()" style="margin-top: 5px" class="">查询</el-button>
  699. </el-form-item>
  700. </el-col>
  701. </el-row>
  702. </el-form>
  703. <el-table
  704. :height="400"
  705. :data="chooseResourceList"
  706. border
  707. style="width: 100%;">
  708. <el-table-column
  709. v-for="(item,index) in chooseResourceColumnList" :key="index"
  710. :sortable="item.columnSortable"
  711. :prop="item.columnProp"
  712. :header-align="item.headerAlign"
  713. :show-overflow-tooltip="item.showOverflowTooltip"
  714. :align="item.align"
  715. :fixed="item.fixed==''?false:item.fixed"
  716. :min-width="item.columnWidth"
  717. :label="item.columnLabel">
  718. <template slot-scope="scope">
  719. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  720. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  721. </template>
  722. </el-table-column>
  723. <el-table-column
  724. fixed="left"
  725. header-align="center"
  726. align="center"
  727. width="60"
  728. label="操作">
  729. <template slot-scope="scope">
  730. <a type="text" size="small" @click="chooseResource(scope.row)">选择</a>
  731. </template>
  732. </el-table-column>
  733. </el-table>
  734. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  735. <el-button type="primary" @click="chooseResourceModalFlag = false">关闭</el-button>
  736. </el-footer>
  737. </el-dialog>
  738. <el-dialog title="申请单明细" :close-on-click-modal="false" v-drag :visible.sync="saveOrderDetailFlag" width="750px">
  739. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  740. <!-- BOM物料和非BOM物料选择 -->
  741. <el-row :gutter="20" style="margin-bottom: 15px;">
  742. <el-col :span="24">
  743. <el-form-item :label="'物料类型'">
  744. <el-radio-group v-model="orderDetailData.materialType" @change="onMaterialTypeChange">
  745. <el-radio label="BOM物料">BOM物料</el-radio>
  746. <el-radio label="非BOM物料">非BOM物料</el-radio>
  747. </el-radio-group>
  748. </el-form-item>
  749. </el-col>
  750. </el-row>
  751. <el-row :gutter="20">
  752. <el-col :span="6">
  753. <el-form-item>
  754. <template slot="label">
  755. <span v-if="orderDetailData.materialType === '非BOM物料'" slot="label">生产订单</span>
  756. <span v-else style="cursor: pointer" slot="label" @click="openChooseOrderModal"><a>生产订单</a></span>
  757. </template>
  758. <el-input v-model="orderDetailData.orderNo" disabled placeholder="请选择生产订单"></el-input>
  759. </el-form-item>
  760. </el-col>
  761. <el-col :span="6">
  762. <el-form-item>
  763. <template slot="label">
  764. <span v-if="orderDetailData.materialType === '非BOM物料'" slot="label">派工单号</span>
  765. <span v-else style="cursor: pointer" slot="label" @click="openChooseSOSModal"><a>派工单号</a></span>
  766. </template>
  767. <el-input v-model="orderDetailData.seqNo" disabled></el-input>
  768. </el-form-item>
  769. </el-col>
  770. <el-col :span="6">
  771. <el-form-item>
  772. <template slot="label">
  773. <span v-if="!orderDetailData.orderNo" slot="label">工序名称</span>
  774. <span v-else style="cursor: pointer" slot="label" @click="openChooseOperationModal"><a>工序名称</a></span>
  775. </template>
  776. <el-input v-model="orderDetailData.itemDesc" disabled placeholder="请选择工序"></el-input>
  777. </el-form-item>
  778. </el-col>
  779. <el-col :span="6">
  780. <el-form-item>
  781. <template slot="label">
  782. <span v-if="!orderDetailData.orderNo" slot="label">机台</span>
  783. <span v-else style="cursor: pointer" slot="label" @click="openChooseResourceModal"><a>机台</a></span>
  784. </template>
  785. <el-input v-model="orderDetailData.resourceDesc" disabled placeholder="请选择机台"></el-input>
  786. </el-form-item>
  787. </el-col>
  788. </el-row>
  789. <el-row :gutter="20">
  790. <el-col :span="6">
  791. <el-form-item>
  792. <template slot="label">
  793. <span v-if="orderDetailData.materialType === 'BOM物料'" slot="label">物料编码</span>
  794. <span v-else style="cursor: pointer" slot="label" @click="openChoosePartModal"><a>物料编码</a></span>
  795. </template>
  796. <el-input v-model="orderDetailData.partNo" :disabled="orderDetailData.materialType === 'BOM物料'"></el-input>
  797. </el-form-item>
  798. </el-col>
  799. <el-col :span="18">
  800. <el-form-item :label="'物料描述'" style="display: block">
  801. <el-input v-model="orderDetailData.partDesc" disabled></el-input>
  802. </el-form-item>
  803. </el-col>
  804. </el-row>
  805. <el-row :gutter="20">
  806. <el-col :span="6">
  807. <el-form-item :label="'工单/派工数量'">
  808. <el-input v-model="orderDetailData.qtyRequired" disabled style="text-align: right" class="text-right"></el-input>
  809. </el-form-item>
  810. </el-col>
  811. <el-col :span="6">
  812. <el-form-item :label="'此次领料数量'" >
  813. <el-input-number v-model="orderDetailData.issureQty" style="line-height: 20px;padding: 0;width: 100%" :controls="false" :step="0" :min="0" class="text-right"></el-input-number>
  814. </el-form-item>
  815. </el-col>
  816. <el-col :span="6">
  817. <el-form-item :label="'要求发料时间'">
  818. <el-date-picker
  819. style="width: 165px"
  820. v-model="orderDetailData.needDate"
  821. type="datetime"
  822. value-format="yyyy-MM-dd HH:mm:ss"
  823. placeholder="选择日期">
  824. </el-date-picker>
  825. </el-form-item>
  826. </el-col>
  827. </el-row>
  828. </el-form>
  829. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  830. <el-button type="primary" @click="saveOrderDetail()">保存</el-button>
  831. <el-button type="primary" @click="saveOrderDetailFlag=false">关闭</el-button>
  832. </el-footer>
  833. </el-dialog>
  834. </div>
  835. </template>
  836. <script>
  837. import {
  838. searchNotifyHeader
  839. , searchNotifyOrderList
  840. , searchNotifyMaterialList
  841. , searchSumNotifyMaterialList
  842. , deleteNotifySOSPlus
  843. , updateNotifyStatus
  844. , deleteNotifyMaterial
  845. , searchNotifyLog
  846. , searchNotifyLogClose
  847. , getSiteAndBuByUserName
  848. , createNotify
  849. , getSOScheduledRoutingListForIssure
  850. , getPartList
  851. } from "@/api/orderIssure/soIssueNotify.js"
  852. import {
  853. searchShopOrderByPaging
  854. , getRouteInShopOrder
  855. } from "@/api/shopOrder/shopOrder.js"
  856. import {
  857. searchAllResource
  858. } from "@/api/base/site.js"
  859. import {
  860. getTableDefaultListLanguage,
  861. getTableUserListLanguage,
  862. } from "@/api/table.js"
  863. export default {
  864. data() {
  865. return {
  866. height:200,
  867. activeName: 'detail',
  868. dataList: [],
  869. dataList2: [],
  870. dataList3: [],
  871. dataList4: [],
  872. dataList5: [],
  873. dataList6: [],
  874. userBuList:[],
  875. createNotifyFlag: false,
  876. saveOrderDetailFlag: false,
  877. closeData:{
  878. site:'',
  879. notifyNo:'',
  880. closeRemark:'',
  881. username:this.$store.state.user.name,
  882. },
  883. closeModalFlag:false,
  884. searchData: {
  885. page: 1,
  886. limit: 100,
  887. site:'',
  888. userName: '',
  889. notifyNo: '',
  890. status: '',
  891. issueFlag: '',
  892. loginUserName: this.$store.state.user.name,
  893. issueResult: '',
  894. startDate: this.dayjs().format("YYYY-MM-DD"),
  895. endDate: this.dayjs().format("YYYY-MM-DD"),
  896. sql: "",
  897. },
  898. notifyData:{
  899. site: '',
  900. bu: '',
  901. notifyNo: '',
  902. notifyDate: '',
  903. enteredDate: '',
  904. userName: this.$store.state.user.name,
  905. userDisplay: '',
  906. remark: '',
  907. planIssueDate: '',
  908. outWorkOrderFlag: false,
  909. },
  910. pageIndex: 1,
  911. pageSize: 100,
  912. totalPage: 0,
  913. //工单分页
  914. co_pageIndex: 1,
  915. co_pageSize: 100,
  916. co_totalPage: 0,
  917. dataListLoading: false,
  918. currentRow:'',
  919. columnList1:[
  920. {
  921. userId: this.$store.state.user.name,
  922. functionId: 701002,
  923. serialNumber: '701002Table1NotifyNo',
  924. tableId: "701002Table1",
  925. tableName: "领料申请主表",
  926. columnProp: "notifyNo",
  927. headerAlign: "center",
  928. align: "center",
  929. columnLabel: "申请单单号",
  930. columnHidden: false,
  931. columnImage: false,
  932. columnSortable: false,
  933. sortLv: 0,
  934. status: true,
  935. fixed: '',
  936. columnWidth: 100
  937. },{
  938. userId: this.$store.state.user.name,
  939. functionId: 701002,
  940. serialNumber: '701002Table1Bu',
  941. tableId: "701002Table1",
  942. tableName: "领料申请主表",
  943. columnProp: "bu",
  944. headerAlign: "center",
  945. align: "center",
  946. columnLabel: "BU",
  947. columnHidden: false,
  948. columnImage: false,
  949. columnSortable: false,
  950. sortLv: 0,
  951. status: true,
  952. fixed: '',
  953. columnWidth: 100
  954. },{
  955. userId: this.$store.state.user.name,
  956. functionId: 701002,
  957. serialNumber: '701002Table1NotifyDate',
  958. tableId: "701002Table1",
  959. tableName: "领料申请主表",
  960. columnProp: "notifyDate",
  961. headerAlign: "center",
  962. align: "center",
  963. columnLabel: "申请日期",
  964. columnHidden: false,
  965. columnImage: false,
  966. columnSortable: false,
  967. sortLv: 0,
  968. status: true,
  969. fixed: '',
  970. columnWidth: 100
  971. },{
  972. userId: this.$store.state.user.name,
  973. functionId: 701002,
  974. serialNumber: '701002Table1UserName',
  975. tableId: "701002Table1",
  976. tableName: "领料申请主表",
  977. columnProp: "userName",
  978. headerAlign: "center",
  979. align: "left",
  980. columnLabel: "申请账号",
  981. columnHidden: false,
  982. columnImage: false,
  983. columnSortable: false,
  984. sortLv: 0,
  985. status: true,
  986. fixed: '',
  987. columnWidth: 100
  988. },{
  989. userId: this.$store.state.user.name,
  990. functionId: 701002,
  991. serialNumber: '701002Table1UserDisplay',
  992. tableId: "701002Table1",
  993. tableName: "领料申请主表",
  994. columnProp: "userDisplay",
  995. headerAlign: "center",
  996. align: "left",
  997. columnLabel: "申请人姓名",
  998. columnHidden: false,
  999. columnImage: false,
  1000. columnSortable: false,
  1001. sortLv: 0,
  1002. status: true,
  1003. fixed: '',
  1004. columnWidth: 100
  1005. },{
  1006. userId: this.$store.state.user.name,
  1007. functionId: 701002,
  1008. serialNumber: '701002Table1IssueFlag',
  1009. tableId: "701002Table1",
  1010. tableName: "领料申请主表",
  1011. columnProp: "issueFlag",
  1012. headerAlign: "center",
  1013. align: "center",
  1014. columnLabel: "是否领料",
  1015. columnHidden: false,
  1016. columnImage: false,
  1017. columnSortable: false,
  1018. sortLv: 0,
  1019. status: true,
  1020. fixed: '',
  1021. columnWidth: 60
  1022. },{
  1023. userId: this.$store.state.user.name,
  1024. functionId: 701002,
  1025. serialNumber: '701002Table1IssueResult',
  1026. tableId: "701002Table1",
  1027. tableName: "领料申请主表",
  1028. columnProp: "issueResult",
  1029. headerAlign: "center",
  1030. align: "left",
  1031. columnLabel: "领料结果",
  1032. columnHidden: false,
  1033. columnImage: false,
  1034. columnSortable: false,
  1035. sortLv: 0,
  1036. status: true,
  1037. fixed: '',
  1038. columnWidth: 120
  1039. },{
  1040. userId: this.$store.state.user.name,
  1041. functionId: 701002,
  1042. serialNumber: '701002Table1Status',
  1043. tableId: "701002Table1",
  1044. tableName: "领料申请主表",
  1045. columnProp: "status",
  1046. headerAlign: "center",
  1047. align: "left",
  1048. columnLabel: "状态",
  1049. columnHidden: false,
  1050. columnImage: false,
  1051. columnSortable: false,
  1052. sortLv: 0,
  1053. status: true,
  1054. fixed: '',
  1055. columnWidth: 80
  1056. },{
  1057. userId: this.$store.state.user.name,
  1058. functionId: 701002,
  1059. serialNumber: '701002Table1Remark',
  1060. tableId: "701002Table1",
  1061. tableName: "领料申请主表",
  1062. columnProp: "remark",
  1063. headerAlign: "center",
  1064. align: "left",
  1065. columnLabel: "备注",
  1066. columnHidden: false,
  1067. columnImage: false,
  1068. columnSortable: false,
  1069. sortLv: 0,
  1070. status: true,
  1071. fixed: '',
  1072. columnWidth: 200
  1073. },
  1074. ],
  1075. columnList2:[
  1076. {
  1077. userId: this.$store.state.user.name,
  1078. functionId: 701002,
  1079. serialNumber: '701002Table2ItemNo',
  1080. tableId: "701002Table2",
  1081. tableName: "申请单派工单明细表",
  1082. columnProp: "itemNo",
  1083. headerAlign: "center",
  1084. align: "right",
  1085. columnLabel: "序号",
  1086. columnHidden: false,
  1087. columnImage: false,
  1088. columnSortable: false,
  1089. sortLv: 0,
  1090. status: true,
  1091. fixed: '',
  1092. columnWidth: 40
  1093. },
  1094. {
  1095. userId: this.$store.state.user.name,
  1096. functionId: 701002,
  1097. serialNumber: '701002Table2NeedDate',
  1098. tableId: "701002Table2",
  1099. tableName: "领料申请派工单子表",
  1100. columnProp: 'needDate',
  1101. headerAlign: "center",
  1102. align: "left",
  1103. columnLabel: '要求发料时间',
  1104. columnHidden: false,
  1105. columnImage: false,
  1106. columnSortable: false,
  1107. sortLv: 0,
  1108. status: true,
  1109. fixed: '',
  1110. columnWidth: 80,
  1111. },{
  1112. userId: this.$store.state.user.name,
  1113. functionId: 701002,
  1114. serialNumber: '701002Table2SOOrderNo',
  1115. tableId: "701002Table2",
  1116. tableName: "申请单派工单明细表",
  1117. columnProp: "sOOrderNo",
  1118. headerAlign: "center",
  1119. align: "left",
  1120. columnLabel: "生产订单",
  1121. columnHidden: false,
  1122. columnImage: false,
  1123. columnSortable: false,
  1124. sortLv: 0,
  1125. status: true,
  1126. fixed: '',
  1127. columnWidth: 120
  1128. },{
  1129. userId: this.$store.state.user.name,
  1130. functionId: 701002,
  1131. serialNumber: '701002Table2OpsItemNo',
  1132. tableId: "701002Table2",
  1133. tableName: "申请单派工单明细表",
  1134. columnProp: "opsItemNo",
  1135. headerAlign: "center",
  1136. align: "right",
  1137. columnLabel: "工序",
  1138. columnHidden: false,
  1139. columnImage: false,
  1140. columnSortable: false,
  1141. sortLv: 0,
  1142. status: true,
  1143. fixed: '',
  1144. columnWidth: 50
  1145. },{
  1146. userId: this.$store.state.user.name,
  1147. functionId: 701002,
  1148. serialNumber: '701002Table2ItemDesc',
  1149. tableId: "701002Table2",
  1150. tableName: "申请单派工单明细表",
  1151. columnProp: "itemDesc",
  1152. headerAlign: "center",
  1153. align: "left",
  1154. columnLabel: "工序名称",
  1155. columnHidden: false,
  1156. columnImage: false,
  1157. columnSortable: false,
  1158. sortLv: 0,
  1159. status: true,
  1160. fixed: '',
  1161. columnWidth: 120
  1162. },{
  1163. userId: this.$store.state.user.name,
  1164. functionId: 701002,
  1165. serialNumber: '701002Table2SeqNo',
  1166. tableId: "701002Table2",
  1167. tableName: "申请单派工单明细表",
  1168. columnProp: "seqNo",
  1169. headerAlign: "center",
  1170. align: "left",
  1171. columnLabel: "派工单号",
  1172. columnHidden: false,
  1173. columnImage: false,
  1174. columnSortable: false,
  1175. sortLv: 0,
  1176. status: true,
  1177. fixed: '',
  1178. columnWidth: 150
  1179. }, {
  1180. userId: this.$store.state.user.name,
  1181. functionId: 701002,
  1182. serialNumber: '701002Table2FGPartNo',
  1183. tableId: "701002Table2",
  1184. tableName: "申请单派工单明细表",
  1185. columnProp: "fGPartNo",
  1186. headerAlign: "center",
  1187. align: "left",
  1188. columnLabel: "派工单物料",
  1189. columnHidden: false,
  1190. columnImage: false,
  1191. columnSortable: false,
  1192. sortLv: 0,
  1193. status: true,
  1194. fixed: '',
  1195. columnWidth: 80
  1196. }, {
  1197. userId: this.$store.state.user.name,
  1198. functionId: 701002,
  1199. serialNumber: '701002Table2PartDesc',
  1200. tableId: "701002Table2",
  1201. tableName: "申请单派工单明细表",
  1202. columnProp: "partDesc",
  1203. headerAlign: "center",
  1204. align: "left",
  1205. columnLabel: "物料名称",
  1206. columnHidden: false,
  1207. columnImage: false,
  1208. columnSortable: false,
  1209. sortLv: 0,
  1210. status: true,
  1211. fixed: '',
  1212. columnWidth: 200
  1213. },
  1214. {
  1215. userId: this.$store.state.user.name,
  1216. functionId: 701002,
  1217. serialNumber: '701002Table2LocationNo',
  1218. tableId: "701002Table2",
  1219. tableName: "领料申请派工单子表",
  1220. columnProp: 'locationNo',
  1221. headerAlign: "center",
  1222. align: "left",
  1223. columnLabel: '库位编码',
  1224. columnHidden: false,
  1225. columnImage: false,
  1226. columnSortable: false,
  1227. sortLv: 0,
  1228. status: true,
  1229. fixed: '',
  1230. columnWidth: 80,
  1231. },
  1232. {
  1233. userId: this.$store.state.user.name,
  1234. functionId: 701002,
  1235. serialNumber: '701002Table2IssureQty',
  1236. tableId: "701002Table2",
  1237. tableName: "申请单派工单明细表",
  1238. columnProp: "issureQty",
  1239. headerAlign: "center",
  1240. align: "right",
  1241. columnLabel: "发料数量",
  1242. columnHidden: false,
  1243. columnImage: false,
  1244. columnSortable: false,
  1245. sortLv: 0,
  1246. status: true,
  1247. fixed: '',
  1248. columnWidth: 80
  1249. },
  1250. ],
  1251. columnList3:[
  1252. {
  1253. userId: this.$store.state.user.name,
  1254. functionId: 701002,
  1255. serialNumber: '701002Table3ItemNo',
  1256. tableId: "701002Table3",
  1257. tableName: "申请单材料明细表",
  1258. columnProp: "itemNo",
  1259. headerAlign: "center",
  1260. align: "right",
  1261. columnLabel: "申请单序号",
  1262. columnHidden: false,
  1263. columnImage: false,
  1264. columnSortable: false,
  1265. sortLv: 0,
  1266. status: true,
  1267. fixed: '',
  1268. columnWidth: 80
  1269. },{
  1270. userId: this.$store.state.user.name,
  1271. functionId: 701002,
  1272. serialNumber: '701002Table3ComponentPartNo',
  1273. tableId: "701002Table3",
  1274. tableName: "申请单材料明细表",
  1275. columnProp: "componentPartNo",
  1276. headerAlign: "center",
  1277. align: "center",
  1278. columnLabel: "材料编码",
  1279. columnHidden: false,
  1280. columnImage: false,
  1281. columnSortable: false,
  1282. sortLv: 0,
  1283. status: true,
  1284. fixed: '',
  1285. columnWidth: 100
  1286. },{
  1287. userId: this.$store.state.user.name,
  1288. functionId: 701002,
  1289. serialNumber: '701002Table3PartDesc',
  1290. tableId: "701002Table3",
  1291. tableName: "申请单材料明细表",
  1292. columnProp: "partDesc",
  1293. headerAlign: "center",
  1294. align: "left",
  1295. columnLabel: "材料名称",
  1296. columnHidden: false,
  1297. columnImage: false,
  1298. columnSortable: false,
  1299. sortLv: 0,
  1300. status: true,
  1301. fixed: '',
  1302. columnWidth: 130
  1303. },{
  1304. userId: this.$store.state.user.name,
  1305. functionId: 701002,
  1306. serialNumber: '701002Table3NeedDate',
  1307. tableId: "701002Table3",
  1308. tableName: "申请单材料明细表",
  1309. columnProp: "needDate",
  1310. headerAlign: "center",
  1311. align: "center",
  1312. columnLabel: "需求时间",
  1313. columnHidden: false,
  1314. columnImage: false,
  1315. columnSortable: false,
  1316. sortLv: 0,
  1317. status: true,
  1318. fixed: '',
  1319. columnWidth: 110
  1320. },{
  1321. userId: this.$store.state.user.name,
  1322. functionId: 701002,
  1323. serialNumber: '701002Table3QtyToIssue',
  1324. tableId: "701002Table3",
  1325. tableName: "申请单材料明细表",
  1326. columnProp: "qtyToIssue",
  1327. headerAlign: "center",
  1328. align: "right",
  1329. columnLabel: "申请数量",
  1330. columnHidden: false,
  1331. columnImage: false,
  1332. columnSortable: false,
  1333. sortLv: 0,
  1334. status: true,
  1335. fixed: '',
  1336. columnWidth: 80
  1337. },{
  1338. userId: this.$store.state.user.name,
  1339. functionId: 701002,
  1340. serialNumber: '701002Table3QtyToIssueOriginal',
  1341. tableId: "701002Table3",
  1342. tableName: "申请单材料明细表",
  1343. columnProp: "qtyToIssueOriginal",
  1344. headerAlign: "center",
  1345. align: "right",
  1346. columnLabel: "已发数量",
  1347. columnHidden: false,
  1348. columnImage: false,
  1349. columnSortable: false,
  1350. sortLv: 0,
  1351. status: true,
  1352. fixed: '',
  1353. columnWidth: 80
  1354. },{
  1355. userId: this.$store.state.user.name,
  1356. functionId: 701002,
  1357. serialNumber: '701002Table3IssueType',
  1358. tableId: "701002Table3",
  1359. tableName: "申请单材料明细表",
  1360. columnProp: "issueType",
  1361. headerAlign: "center",
  1362. align: "right",
  1363. columnLabel: "类型",
  1364. columnHidden: false,
  1365. columnImage: false,
  1366. columnSortable: false,
  1367. sortLv: 0,
  1368. status: true,
  1369. fixed: '',
  1370. columnWidth: 80
  1371. },{
  1372. userId: this.$store.state.user.name,
  1373. functionId: 701002,
  1374. serialNumber: '701002Table3Remark',
  1375. tableId: "701002Table3",
  1376. tableName: "申请单材料明细表",
  1377. columnProp: "remark",
  1378. headerAlign: "center",
  1379. align: "left",
  1380. columnLabel: "备注",
  1381. columnHidden: false,
  1382. columnImage: false,
  1383. columnSortable: false,
  1384. sortLv: 0,
  1385. status: true,
  1386. fixed: '',
  1387. columnWidth: 160
  1388. },{
  1389. userId: this.$store.state.user.name,
  1390. functionId: 701002,
  1391. serialNumber: '701002Table3SOOrderNo',
  1392. tableId: "701002Table3",
  1393. tableName: "申请单材料明细表",
  1394. columnProp: "orderNo",
  1395. headerAlign: "center",
  1396. align: "left",
  1397. columnLabel: "生产订单",
  1398. columnHidden: false,
  1399. columnImage: false,
  1400. columnSortable: false,
  1401. sortLv: 0,
  1402. status: true,
  1403. fixed: '',
  1404. columnWidth: 120
  1405. },{
  1406. userId: this.$store.state.user.name,
  1407. functionId: 701002,
  1408. serialNumber: '701002Table3OpsItemNo',
  1409. tableId: "701002Table3",
  1410. tableName: "申请单材料明细表",
  1411. columnProp: "opsItemNo",
  1412. headerAlign: "center",
  1413. align: "right",
  1414. columnLabel: "工序",
  1415. columnHidden: false,
  1416. columnImage: false,
  1417. columnSortable: false,
  1418. sortLv: 0,
  1419. status: true,
  1420. fixed: '',
  1421. columnWidth: 50
  1422. },{
  1423. userId: this.$store.state.user.name,
  1424. functionId: 701002,
  1425. serialNumber: '701002Table3SeqNo',
  1426. tableId: "701002Table3",
  1427. tableName: "申请单材料明细表",
  1428. columnProp: "seqNo",
  1429. headerAlign: "center",
  1430. align: "left",
  1431. columnLabel: "派工单号",
  1432. columnHidden: false,
  1433. columnImage: false,
  1434. columnSortable: false,
  1435. sortLv: 0,
  1436. status: true,
  1437. fixed: '',
  1438. columnWidth: 150
  1439. },{
  1440. userId: this.$store.state.user.name,
  1441. functionId: 701002,
  1442. serialNumber: '701002Table3LocationNo',
  1443. tableId: "701002Table3",
  1444. tableName: "申请单材料明细表",
  1445. columnProp: "locationNo",
  1446. headerAlign: "center",
  1447. align: "left",
  1448. columnLabel: "机台",
  1449. columnHidden: false,
  1450. columnImage: false,
  1451. columnSortable: false,
  1452. sortLv: 0,
  1453. status: true,
  1454. fixed: '',
  1455. columnWidth: 80
  1456. },{
  1457. userId: this.$store.state.user.name,
  1458. functionId: 701002,
  1459. serialNumber: '701002Table3BOMItemNo',
  1460. tableId: "701002Table3",
  1461. tableName: "申请单材料明细表",
  1462. columnProp: "bOMItemNo",
  1463. headerAlign: "center",
  1464. align: "right",
  1465. columnLabel: "BOM序号",
  1466. columnHidden: false,
  1467. columnImage: false,
  1468. columnSortable: false,
  1469. sortLv: 0,
  1470. status: true,
  1471. fixed: '',
  1472. columnWidth: 80
  1473. },
  1474. ],
  1475. columnList4:[
  1476. {
  1477. userId: this.$store.state.user.name,
  1478. functionId: 701002,
  1479. serialNumber: '701002Table4IssueType',
  1480. tableId: "701002Table4",
  1481. tableName: "申请单材料明细表",
  1482. columnProp: "issueType",
  1483. headerAlign: "center",
  1484. align: "center",
  1485. columnLabel: "类型",
  1486. columnHidden: false,
  1487. columnImage: false,
  1488. columnSortable: false,
  1489. sortLv: 0,
  1490. status: true,
  1491. fixed: '',
  1492. columnWidth: 100
  1493. },
  1494. {
  1495. userId: this.$store.state.user.name,
  1496. functionId: 701002,
  1497. serialNumber: '701002Table4ComponentPartNo',
  1498. tableId: "701002Table4",
  1499. tableName: "申请单材料明细表",
  1500. columnProp: "componentPartNo",
  1501. headerAlign: "center",
  1502. align: "center",
  1503. columnLabel: "材料编码",
  1504. columnHidden: false,
  1505. columnImage: false,
  1506. columnSortable: false,
  1507. sortLv: 0,
  1508. status: true,
  1509. fixed: '',
  1510. columnWidth: 100
  1511. },{
  1512. userId: this.$store.state.user.name,
  1513. functionId: 701002,
  1514. serialNumber: '701002Table4PartDesc',
  1515. tableId: "701002Table4",
  1516. tableName: "申请单材料明细表",
  1517. columnProp: "partDesc",
  1518. headerAlign: "center",
  1519. align: "left",
  1520. columnLabel: "材料名称",
  1521. columnHidden: false,
  1522. columnImage: false,
  1523. columnSortable: false,
  1524. sortLv: 0,
  1525. status: true,
  1526. fixed: '',
  1527. columnWidth: 130
  1528. },{
  1529. userId: this.$store.state.user.name,
  1530. functionId: 701002,
  1531. serialNumber: '701002Table4QtyToIssue',
  1532. tableId: "701002Table4",
  1533. tableName: "申请单材料明细表",
  1534. columnProp: "qtyToIssue",
  1535. headerAlign: "center",
  1536. align: "right",
  1537. columnLabel: "合计申请数量",
  1538. columnHidden: false,
  1539. columnImage: false,
  1540. columnSortable: false,
  1541. sortLv: 0,
  1542. status: true,
  1543. fixed: '',
  1544. columnWidth: 80
  1545. },{
  1546. userId: this.$store.state.user.name,
  1547. functionId: 701002,
  1548. serialNumber: '701002Table4QtyToIssueOriginal',
  1549. tableId: "701002Table4",
  1550. tableName: "申请单材料明细表",
  1551. columnProp: "qtyToIssueOriginal",
  1552. headerAlign: "center",
  1553. align: "right",
  1554. columnLabel: "合计已发数量",
  1555. columnHidden: false,
  1556. columnImage: false,
  1557. columnSortable: false,
  1558. sortLv: 0,
  1559. status: true,
  1560. fixed: '',
  1561. columnWidth: 80
  1562. },
  1563. ],
  1564. columnList5:[
  1565. {
  1566. userId: this.$store.state.user.name,
  1567. functionId: 701002,
  1568. serialNumber: '701002Table5UpdateType',
  1569. tableId: "701002Table5",
  1570. tableName: "申请单材料删除记录表",
  1571. columnProp: "updateType",
  1572. headerAlign: "center",
  1573. align: "center",
  1574. columnLabel: "删除类型",
  1575. columnHidden: false,
  1576. columnImage: false,
  1577. columnSortable: false,
  1578. sortLv: 0,
  1579. status: true,
  1580. fixed: '',
  1581. columnWidth: 100
  1582. },
  1583. {
  1584. userId: this.$store.state.user.name,
  1585. functionId: 701002,
  1586. serialNumber: '701002Table5ItemNo',
  1587. tableId: "701002Table5",
  1588. tableName: "申请单材料删除记录表",
  1589. columnProp: "itemNo",
  1590. headerAlign: "center",
  1591. align: "right",
  1592. columnLabel: "领料单序号",
  1593. columnHidden: false,
  1594. columnImage: false,
  1595. columnSortable: false,
  1596. sortLv: 0,
  1597. status: true,
  1598. fixed: '',
  1599. columnWidth: 80
  1600. },
  1601. {
  1602. userId: this.$store.state.user.name,
  1603. functionId: 701002,
  1604. serialNumber: '701002Table5SOOrderNo',
  1605. tableId: "701002Table5",
  1606. tableName: "申请单材料删除记录表",
  1607. columnProp: "sOOrderNo",
  1608. headerAlign: "center",
  1609. align: "left",
  1610. columnLabel: "生产订单",
  1611. columnHidden: false,
  1612. columnImage: false,
  1613. columnSortable: false,
  1614. sortLv: 0,
  1615. status: true,
  1616. fixed: '',
  1617. columnWidth: 80
  1618. },
  1619. {
  1620. userId: this.$store.state.user.name,
  1621. functionId: 701002,
  1622. serialNumber: '701002Table5SeqNo',
  1623. tableId: "701002Table5",
  1624. tableName: "申请单材料删除记录表",
  1625. columnProp: "seqNo",
  1626. headerAlign: "center",
  1627. align: "left",
  1628. columnLabel: "派工单",
  1629. columnHidden: false,
  1630. columnImage: false,
  1631. columnSortable: false,
  1632. sortLv: 0,
  1633. status: true,
  1634. fixed: '',
  1635. columnWidth: 120
  1636. },
  1637. {
  1638. userId: this.$store.state.user.name,
  1639. functionId: 701002,
  1640. serialNumber: '701002Table5ComponentPartNo',
  1641. tableId: "701002Table5",
  1642. tableName: "申请单材料删除记录表",
  1643. columnProp: "componentPartNo",
  1644. headerAlign: "center",
  1645. align: "left",
  1646. columnLabel: "材料物料编码",
  1647. columnHidden: false,
  1648. columnImage: false,
  1649. columnSortable: false,
  1650. sortLv: 0,
  1651. status: true,
  1652. fixed: '',
  1653. columnWidth: 100
  1654. },
  1655. {
  1656. userId: this.$store.state.user.name,
  1657. functionId: 701002,
  1658. serialNumber: '701002Table5IssueType',
  1659. tableId: "701002Table5",
  1660. tableName: "申请单材料删除记录表",
  1661. columnProp: "issueType",
  1662. headerAlign: "center",
  1663. align: "left",
  1664. columnLabel: "材料类型",
  1665. columnHidden: false,
  1666. columnImage: false,
  1667. columnSortable: false,
  1668. sortLv: 0,
  1669. status: true,
  1670. fixed: '',
  1671. columnWidth: 100
  1672. },
  1673. {
  1674. userId: this.$store.state.user.name,
  1675. functionId: 701002,
  1676. serialNumber: '701002Table5QtyToIssue',
  1677. tableId: "701002Table5",
  1678. tableName: "申请单材料删除记录表",
  1679. columnProp: "qtyToIssue",
  1680. headerAlign: "center",
  1681. align: "right",
  1682. columnLabel: "要求领料数量",
  1683. columnHidden: false,
  1684. columnImage: false,
  1685. columnSortable: false,
  1686. sortLv: 0,
  1687. status: true,
  1688. fixed: '',
  1689. columnWidth: 100
  1690. },
  1691. {
  1692. userId: this.$store.state.user.name,
  1693. functionId: 701002,
  1694. serialNumber: '701002Table5UpdateBy',
  1695. tableId: "701002Table5",
  1696. tableName: "申请单材料删除记录表",
  1697. columnProp: "updateBy",
  1698. headerAlign: "center",
  1699. align: "left",
  1700. columnLabel: "删除账号",
  1701. columnHidden: false,
  1702. columnImage: false,
  1703. columnSortable: false,
  1704. sortLv: 0,
  1705. status: true,
  1706. fixed: '',
  1707. columnWidth: 100
  1708. },
  1709. {
  1710. userId: this.$store.state.user.name,
  1711. functionId: 701002,
  1712. serialNumber: '701002Table5UpdateDate',
  1713. tableId: "701002Table5",
  1714. tableName: "申请单材料删除记录表",
  1715. columnProp: "updateDate",
  1716. headerAlign: "center",
  1717. align: "center",
  1718. columnLabel: "删除时间",
  1719. columnHidden: false,
  1720. columnImage: false,
  1721. columnSortable: false,
  1722. sortLv: 0,
  1723. status: true,
  1724. fixed: '',
  1725. columnWidth: 120
  1726. },
  1727. ],
  1728. columnList6:[
  1729. {
  1730. userId: this.$store.state.user.name,
  1731. functionId: 701002,
  1732. serialNumber: '701002Table6UserDisplay',
  1733. tableId: "701002Table6",
  1734. tableName: "申请单材料关闭明细",
  1735. columnProp: "userDisplay",
  1736. headerAlign: "center",
  1737. align: "left",
  1738. columnLabel: "操作人",
  1739. columnHidden: false,
  1740. columnImage: false,
  1741. columnSortable: false,
  1742. sortLv: 0,
  1743. status: true,
  1744. fixed: '',
  1745. columnWidth: 100
  1746. },
  1747. {
  1748. userId: this.$store.state.user.name,
  1749. functionId: 701002,
  1750. serialNumber: '701002Table6ActionTime',
  1751. tableId: "701002Table6",
  1752. tableName: "申请单材料关闭明细",
  1753. columnProp: "actionTime",
  1754. headerAlign: "center",
  1755. align: "left",
  1756. columnLabel: "操作时间",
  1757. columnHidden: false,
  1758. columnImage: false,
  1759. columnSortable: false,
  1760. sortLv: 0,
  1761. status: true,
  1762. fixed: '',
  1763. columnWidth: 130
  1764. },
  1765. {
  1766. userId: this.$store.state.user.name,
  1767. functionId: 701002,
  1768. serialNumber: '701002Table6ActionRemark',
  1769. tableId: "701002Table6",
  1770. tableName: "申请单材料关闭明细",
  1771. columnProp: "actionRemark",
  1772. headerAlign: "center",
  1773. align: "left",
  1774. columnLabel: "关闭原因",
  1775. columnHidden: false,
  1776. columnImage: false,
  1777. columnSortable: false,
  1778. sortLv: 0,
  1779. status: true,
  1780. fixed: '',
  1781. columnWidth: 300
  1782. },
  1783. ],
  1784. // 导出 start
  1785. exportData: [],
  1786. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  1787. exportHeader: ["发料申请单"],
  1788. exportFooter: [],
  1789. // 导出 end
  1790. orderDetailData:{
  1791. orderNo:'',
  1792. seqNo:'',
  1793. locationNo:'',
  1794. qtyrequired:'',
  1795. issureQty:0,
  1796. partDesc:'',
  1797. partNo:'',
  1798. resourceId:'',
  1799. resourceDesc:'',
  1800. needDate:'',
  1801. itemDesc:'',
  1802. workCenterNo:'',
  1803. itemNo:0,
  1804. materialType:'BOM物料',
  1805. },
  1806. chooseSOSModalFlag: false,
  1807. chooseSOSData: {
  1808. orderno: '',
  1809. seqno: '',
  1810. sResourceid: '',
  1811. startDate: '',
  1812. endDate: '',
  1813. },
  1814. chooseOrderModalFlag: false,
  1815. chooseOrderData: {
  1816. page: 1,
  1817. limit: 100,
  1818. orderNo: '',
  1819. status: '',
  1820. date3: '',
  1821. date4: '',
  1822. statusList: '',
  1823. },
  1824. chooseOrderList: [],
  1825. chooseOperationModalFlag: false,
  1826. chooseOperationData: {
  1827. orderNo: '',
  1828. site: '',
  1829. itemDesc: ''
  1830. },
  1831. chooseOperationList: [],
  1832. chooseResourceModalFlag: false,
  1833. chooseResourceData: {
  1834. site: '',
  1835. workCenterNo: '',
  1836. resourceID: '',
  1837. resourceDesc: '',
  1838. },
  1839. chooseResourceList: [],
  1840. chooseSOSList: [],
  1841. choosePartModalFlag: false,
  1842. choosePartData: {
  1843. site: '',
  1844. sourceBu: '',
  1845. partNo: '',
  1846. partDesc: '',
  1847. spec: '',
  1848. },
  1849. choosePartList: [],
  1850. chooseSOSColumnList: [
  1851. {
  1852. userId: this.$store.state.user.name,
  1853. functionId: 701001,
  1854. serialNumber: '701001Table2Orderno',
  1855. tableId: "701001Table2",
  1856. tableName: "查询派工单",
  1857. columnProp: 'orderno',
  1858. headerAlign: "center",
  1859. align: "center",
  1860. columnLabel: '生产订单',
  1861. columnHidden: false,
  1862. columnImage: false,
  1863. columnSortable: false,
  1864. sortLv: 0,
  1865. status: true,
  1866. fixed: '',
  1867. columnWidth: 120,
  1868. },
  1869. {
  1870. userId: this.$store.state.user.name,
  1871. functionId: 701001,
  1872. serialNumber: '701001Table2Seqno',
  1873. tableId: "701001Table2",
  1874. tableName: "查询派工单",
  1875. columnProp: 'seqno',
  1876. headerAlign: "center",
  1877. align: "center",
  1878. columnLabel: '派工单号',
  1879. columnHidden: false,
  1880. columnImage: false,
  1881. columnSortable: false,
  1882. sortLv: 0,
  1883. status: true,
  1884. fixed: '',
  1885. columnWidth: 150,
  1886. },
  1887. {
  1888. userId: this.$store.state.user.name,
  1889. functionId: 701001,
  1890. serialNumber: '701001Table2PartNo',
  1891. tableId: "701001Table2",
  1892. tableName: "查询派工单",
  1893. columnProp: 'partNo',
  1894. headerAlign: "center",
  1895. align: "left",
  1896. columnLabel: '物料编码',
  1897. columnHidden: false,
  1898. columnImage: false,
  1899. columnSortable: false,
  1900. sortLv: 0,
  1901. status: true,
  1902. fixed: '',
  1903. columnWidth: 80,
  1904. },
  1905. {
  1906. userId: this.$store.state.user.name,
  1907. functionId: 701001,
  1908. serialNumber: '701001Table2PartDesc',
  1909. tableId: "701001Table2",
  1910. tableName: "查询派工单",
  1911. columnProp: 'partDesc',
  1912. headerAlign: "center",
  1913. align: "left",
  1914. columnLabel: '物料描述',
  1915. columnHidden: false,
  1916. columnImage: false,
  1917. columnSortable: false,
  1918. sortLv: 0,
  1919. status: true,
  1920. fixed: '',
  1921. columnWidth: 120,
  1922. },
  1923. {
  1924. userId: this.$store.state.user.name,
  1925. functionId: 701001,
  1926. serialNumber: '701001Table2Qtyrequired',
  1927. tableId: "701001Table2",
  1928. tableName: "查询派工单",
  1929. columnProp: 'qtyrequired',
  1930. headerAlign: "center",
  1931. align: "right",
  1932. columnLabel: '派工数量',
  1933. columnHidden: false,
  1934. columnImage: false,
  1935. columnSortable: false,
  1936. sortLv: 0,
  1937. status: true,
  1938. fixed: '',
  1939. columnWidth: 80,
  1940. },
  1941. {
  1942. userId: this.$store.state.user.name,
  1943. functionId: 701001,
  1944. serialNumber: '701001Table2SResourceid',
  1945. tableId: "701001Table2",
  1946. tableName: "查询派工单",
  1947. columnProp: 'sResourceid',
  1948. headerAlign: "center",
  1949. align: "left",
  1950. columnLabel: '机台编码',
  1951. columnHidden: false,
  1952. columnImage: false,
  1953. columnSortable: false,
  1954. sortLv: 0,
  1955. status: true,
  1956. fixed: '',
  1957. columnWidth: 60,
  1958. },
  1959. {
  1960. userId: this.$store.state.user.name,
  1961. functionId: 701001,
  1962. serialNumber: '701001Table2ResourceDesc',
  1963. tableId: "701001Table2",
  1964. tableName: "查询派工单",
  1965. columnProp: 'resourceDesc',
  1966. headerAlign: "center",
  1967. align: "left",
  1968. columnLabel: '机台名称',
  1969. columnHidden: false,
  1970. columnImage: false,
  1971. columnSortable: false,
  1972. sortLv: 0,
  1973. status: true,
  1974. fixed: '',
  1975. columnWidth: 100,
  1976. },
  1977. {
  1978. userId: this.$store.state.user.name,
  1979. functionId: 701001,
  1980. serialNumber: '701001Table2StartDate',
  1981. tableId: "701001Table2",
  1982. tableName: "查询派工单",
  1983. columnProp: 'startDate',
  1984. headerAlign: "center",
  1985. align: "left",
  1986. columnLabel: '开始日期',
  1987. columnHidden: false,
  1988. columnImage: false,
  1989. columnSortable: false,
  1990. sortLv: 0,
  1991. status: true,
  1992. fixed: '',
  1993. columnWidth: 100,
  1994. },
  1995. ],
  1996. chooseOrderColumnList: [
  1997. {
  1998. userId: this.$store.state.user.name,
  1999. functionId: 701001,
  2000. serialNumber: '701001Table2Orderno',
  2001. tableId: "701001Table2",
  2002. tableName: "查询工单",
  2003. columnProp: 'orderNo',
  2004. headerAlign: "center",
  2005. align: "center",
  2006. columnLabel: '工单号',
  2007. columnHidden: false,
  2008. columnImage: false,
  2009. columnSortable: false,
  2010. sortLv: 0,
  2011. status: true,
  2012. fixed: '',
  2013. columnWidth: 120,
  2014. },
  2015. {
  2016. userId: this.$store.state.user.name,
  2017. functionId: 701001,
  2018. serialNumber: '701001Table2PartNo',
  2019. tableId: "701001Table2",
  2020. tableName: "查询工单",
  2021. columnProp: 'partNo',
  2022. headerAlign: "center",
  2023. align: "left",
  2024. columnLabel: '物料编码',
  2025. columnHidden: false,
  2026. columnImage: false,
  2027. columnSortable: false,
  2028. sortLv: 0,
  2029. status: true,
  2030. fixed: '',
  2031. columnWidth: 120,
  2032. },
  2033. {
  2034. userId: this.$store.state.user.name,
  2035. functionId: 701001,
  2036. serialNumber: '701001Table2PartDescription',
  2037. tableId: "701001Table2",
  2038. tableName: "查询工单",
  2039. columnProp: 'partDescription',
  2040. headerAlign: "center",
  2041. align: "left",
  2042. columnLabel: '物料描述',
  2043. columnHidden: false,
  2044. columnImage: false,
  2045. columnSortable: false,
  2046. sortLv: 0,
  2047. status: true,
  2048. fixed: '',
  2049. columnWidth: 150,
  2050. },
  2051. {
  2052. userId: this.$store.state.user.name,
  2053. functionId: 701001,
  2054. serialNumber: '701001Table2LotSize',
  2055. tableId: "701001Table2",
  2056. tableName: "查询工单",
  2057. columnProp: 'lotSize',
  2058. headerAlign: "center",
  2059. align: "right",
  2060. columnLabel: '工单数量',
  2061. columnHidden: false,
  2062. columnImage: false,
  2063. columnSortable: false,
  2064. sortLv: 0,
  2065. status: true,
  2066. fixed: '',
  2067. columnWidth: 100,
  2068. },
  2069. {
  2070. userId: this.$store.state.user.name,
  2071. functionId: 701001,
  2072. serialNumber: '701001Table2Status',
  2073. tableId: "701001Table2",
  2074. tableName: "查询工单",
  2075. columnProp: 'status',
  2076. headerAlign: "center",
  2077. align: "center",
  2078. columnLabel: '状态',
  2079. columnHidden: false,
  2080. columnImage: false,
  2081. columnSortable: false,
  2082. sortLv: 0,
  2083. status: true,
  2084. fixed: '',
  2085. columnWidth: 80,
  2086. },
  2087. ],
  2088. chooseOperationColumnList: [
  2089. {
  2090. userId: this.$store.state.user.name,
  2091. functionId: 701001,
  2092. serialNumber: '701001Table2ItemNo',
  2093. tableId: "701001Table2",
  2094. tableName: "查询工序",
  2095. columnProp: 'itemNo',
  2096. headerAlign: "center",
  2097. align: "center",
  2098. columnLabel: '工序号',
  2099. columnHidden: false,
  2100. columnImage: false,
  2101. columnSortable: false,
  2102. sortLv: 0,
  2103. status: true,
  2104. fixed: '',
  2105. columnWidth: 80,
  2106. },
  2107. {
  2108. userId: this.$store.state.user.name,
  2109. functionId: 701001,
  2110. serialNumber: '701001Table2OperationDesc',
  2111. tableId: "701001Table2",
  2112. tableName: "查询工序",
  2113. columnProp: 'operationDesc',
  2114. headerAlign: "center",
  2115. align: "left",
  2116. columnLabel: '工序名称',
  2117. columnHidden: false,
  2118. columnImage: false,
  2119. columnSortable: false,
  2120. sortLv: 0,
  2121. status: true,
  2122. fixed: '',
  2123. columnWidth: 120,
  2124. }
  2125. ],
  2126. chooseResourceColumnList: [
  2127. {
  2128. userId: this.$store.state.user.name,
  2129. functionId: 701001,
  2130. serialNumber: '701001Table2ResourceID',
  2131. tableId: "701001Table2",
  2132. tableName: "查询机台",
  2133. columnProp: 'resourceID',
  2134. headerAlign: "center",
  2135. align: "left",
  2136. columnLabel: '机台编码',
  2137. columnHidden: false,
  2138. columnImage: false,
  2139. columnSortable: false,
  2140. sortLv: 0,
  2141. status: true,
  2142. fixed: '',
  2143. columnWidth: 100,
  2144. },
  2145. {
  2146. userId: this.$store.state.user.name,
  2147. functionId: 701001,
  2148. serialNumber: '701001Table2ResourceDesc',
  2149. tableId: "701001Table2",
  2150. tableName: "查询机台",
  2151. columnProp: 'resourceDesc',
  2152. headerAlign: "center",
  2153. align: "left",
  2154. columnLabel: '机台描述',
  2155. columnHidden: false,
  2156. columnImage: false,
  2157. columnSortable: false,
  2158. sortLv: 0,
  2159. status: true,
  2160. fixed: '',
  2161. columnWidth: 150,
  2162. },
  2163. ],
  2164. }
  2165. },
  2166. mounted () {
  2167. this.$nextTick(() => {
  2168. this.height = (window.innerHeight- 315) / 2
  2169. })
  2170. },
  2171. // watch: {
  2172. // searchData: {
  2173. // deep: true,
  2174. // handler: function (newV, oldV) {
  2175. // this.searchData.partNo = this.searchData.partNo.toUpperCase()
  2176. // }
  2177. // },
  2178. // },
  2179. created () {
  2180. // 动态列
  2181. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2182. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2183. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2184. this.getTableUserColumn(this.$route.meta.menuId+'table4',4)
  2185. this.getTableUserColumn(this.$route.meta.menuId+'table5',5)
  2186. this.getTableUserColumn(this.$route.meta.menuId+'table6',6)
  2187. },
  2188. methods: {
  2189. // 动态列开始 获取 用户保存的 格式列
  2190. async getTableUserColumn(tableId, columnId) {
  2191. let queryTableUser = {
  2192. userId: this.$store.state.user.name,
  2193. functionId: this.$route.meta.menuId,
  2194. tableId: tableId,
  2195. status: true,
  2196. languageCode: this.$i18n.locale
  2197. }
  2198. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  2199. if (data.rows.length > 0) {
  2200. //this.columnList1 = []
  2201. switch (columnId) {
  2202. case 1:
  2203. this.columnList1 = data.rows
  2204. break;
  2205. case 2:
  2206. this.columnList2 = data.rows
  2207. break;
  2208. case 3:
  2209. this.columnList3 = data.rows
  2210. break;
  2211. case 4:
  2212. this.columnList4 = data.rows
  2213. break;
  2214. case 5:
  2215. this.columnList5 = data.rows
  2216. break;
  2217. case 6:
  2218. this.columnList6 = data.rows
  2219. break;
  2220. }
  2221. } else {
  2222. this.getColumnList(tableId, columnId)
  2223. }
  2224. })
  2225. },
  2226. // 获取 tableDefault 列
  2227. async getColumnList (tableId, columnId) {
  2228. let queryTable= {
  2229. functionId: this.$route.meta.menuId,
  2230. tableId: tableId,
  2231. languageCode: this.$i18n.locale
  2232. }
  2233. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  2234. if (data.rows&&data.rows.length > 0) {
  2235. switch (columnId) {
  2236. case 1:
  2237. this.columnList1 = data.rows
  2238. break;
  2239. case 2:
  2240. this.columnList2 = data.rows
  2241. break;
  2242. case 3:
  2243. this.columnList3 = data.rows
  2244. break;
  2245. case 4:
  2246. this.columnList4 = data.rows
  2247. break;
  2248. case 5:
  2249. this.columnList5 = data.rows
  2250. break;
  2251. case 6:
  2252. this.columnList6 = data.rows
  2253. break;
  2254. }
  2255. } else {
  2256. // this.showDefault = true.
  2257. }
  2258. })
  2259. },
  2260. // 每页数
  2261. sizeChangeHandle (val) {
  2262. this.pageSize = val
  2263. this.searchTable()
  2264. },
  2265. // 当前页
  2266. currentChangeHandle (val) {
  2267. this.pageIndex = val
  2268. this.searchTable()
  2269. },
  2270. tabClick (tab, event) {
  2271. // 刷新列表数据
  2272. this.refreshCurrentTabTable()
  2273. },
  2274. changeData(row){
  2275. this.currentRow = JSON.parse(JSON.stringify(row));
  2276. this.refreshCurrentTabTable ();
  2277. },
  2278. refreshCurrentTabTable(){
  2279. if(this.currentRow===''||this.currentRow===null){
  2280. this.currentRow={site:'',notifyNo:''}
  2281. }
  2282. if(this.activeName==='detail'){
  2283. searchNotifyOrderList(this.currentRow).then(({data}) => {
  2284. //区分请求成功和失败的状况
  2285. if (data && data.code == 0) {
  2286. this.dataList2 = data.rows
  2287. } else {
  2288. this.dataList2 = [];
  2289. }
  2290. });
  2291. }else if(this.activeName==='sub'){
  2292. searchNotifyMaterialList(this.currentRow).then(({data}) => {
  2293. //区分请求成功和失败的状况
  2294. if (data && data.code == 0) {
  2295. this.dataList3 = data.rows
  2296. } else {
  2297. this.dataList3 = [];
  2298. }
  2299. });
  2300. }else if(this.activeName==='change'){
  2301. searchNotifyLog(this.currentRow).then(({data}) => {
  2302. //区分请求成功和失败的状况
  2303. if (data && data.code == 0) {
  2304. this.dataList5 = data.rows
  2305. } else {
  2306. this.dataList5 = [];
  2307. }
  2308. });
  2309. }else if(this.activeName==='close'){
  2310. searchNotifyLogClose(this.currentRow).then(({data}) => {
  2311. //区分请求成功和失败的状况
  2312. if (data && data.code == 0) {
  2313. this.dataList6 = data.rows
  2314. } else {
  2315. this.dataList6 = [];
  2316. }
  2317. });
  2318. }else {
  2319. searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
  2320. //区分请求成功和失败的状况
  2321. if (data && data.code == 0) {
  2322. this.dataList4 = data.rows
  2323. } else {
  2324. this.dataList4 = [];
  2325. }
  2326. });
  2327. }
  2328. },
  2329. searchTable(){
  2330. this.searchData.limit = this.pageSize
  2331. this.searchData.page = this.pageIndex
  2332. searchNotifyHeader(this.searchData).then(({data}) => {
  2333. //区分请求成功和失败的状况
  2334. if (data && data.code == 0) {
  2335. this.dataList = data.page.list
  2336. this.pageIndex = data.page.currPage
  2337. this.pageSize = data.page.pageSize
  2338. this.totalPage = data.page.totalCount
  2339. } else {
  2340. this.dataList = [];
  2341. }
  2342. });
  2343. },
  2344. closeNotifyModel(row){
  2345. this.closeData.site=row.site
  2346. this.closeData.notifyNo=row.notifyNo
  2347. this.closeData.closeRemark=''
  2348. this.closeModalFlag=true
  2349. },
  2350. closeNotify(){
  2351. if(this.closeData.closeRemark==null||this.closeData.closeRemark===''){
  2352. this.$alert("必须输入关闭原因", '错误', {
  2353. confirmButtonText: '确定'
  2354. })
  2355. return false;
  2356. }
  2357. let inData={
  2358. site:this.closeData.site,
  2359. notifyNo:this.closeData.notifyNo,
  2360. closeRemark:this.closeData.closeRemark,
  2361. username:this.$store.state.user.name,
  2362. status:'已关闭',
  2363. }
  2364. updateNotifyStatus(inData).then(({data}) => {
  2365. if (data && data.code === 0) {
  2366. this.closeModalFlag=false
  2367. this.searchTable()
  2368. this.$message({
  2369. message: '操作成功',
  2370. type: 'success',
  2371. duration: 1500,
  2372. onClose: () => {}
  2373. })
  2374. } else {
  2375. this.$alert(data.msg, '错误', {
  2376. confirmButtonText: '确定'
  2377. })
  2378. }
  2379. })
  2380. },
  2381. openNotify(row){
  2382. this.$confirm('确认打开?', '提示', {
  2383. confirmButtonText: '确定',
  2384. cancelButtonText: '取消',
  2385. type: 'warning'
  2386. }).then(() => {
  2387. let inData={
  2388. site:row.site,
  2389. notifyNo:row.notifyNo,
  2390. status:'已下达',
  2391. }
  2392. updateNotifyStatus(inData).then(({data}) => {
  2393. if (data && data.code === 0) {
  2394. this.searchTable()
  2395. this.$message({
  2396. message: '操作成功',
  2397. type: 'success',
  2398. duration: 1500,
  2399. onClose: () => {}
  2400. })
  2401. } else {
  2402. this.$alert(data.msg, '错误', {
  2403. confirmButtonText: '确定'
  2404. })
  2405. }
  2406. })
  2407. })
  2408. },
  2409. deleteNotifyMaterial(row){
  2410. this.$confirm('确认删除?', '提示', {
  2411. confirmButtonText: '确定',
  2412. cancelButtonText: '取消',
  2413. type: 'warning'
  2414. }).then(() => {
  2415. deleteNotifyMaterial(row).then(({data}) => {
  2416. if (data && data.code === 0) {
  2417. this.refreshCurrentTabTable()
  2418. this.$message({
  2419. message: '操作成功',
  2420. type: 'success',
  2421. duration: 1500,
  2422. onClose: () => {}
  2423. })
  2424. } else {
  2425. this.$alert(data.msg, '错误', {
  2426. confirmButtonText: '确定'
  2427. })
  2428. }
  2429. })
  2430. })
  2431. },
  2432. deleteNotifySOSPlus(row){
  2433. this.$confirm('确认删除?', '提示', {
  2434. confirmButtonText: '确定',
  2435. cancelButtonText: '取消',
  2436. type: 'warning'
  2437. }).then(() => {
  2438. deleteNotifySOSPlus(row).then(({data}) => {
  2439. if (data && data.code === 0) {
  2440. this.refreshCurrentTabTable()
  2441. this.$message({
  2442. message: '操作成功',
  2443. type: 'success',
  2444. duration: 1500,
  2445. onClose: () => {}
  2446. })
  2447. } else {
  2448. this.$alert(data.msg, '错误', {
  2449. confirmButtonText: '确定'
  2450. })
  2451. }
  2452. })
  2453. })
  2454. },
  2455. //申请单主表新增方法
  2456. //新增领料申请单模态框
  2457. createNotifyModal(){
  2458. let inData={
  2459. username:this.$store.state.user.name
  2460. }
  2461. getSiteAndBuByUserName(inData).then(({data}) =>{
  2462. if (data && data.code === 0) {
  2463. this.userBuList=data.rows
  2464. if (this.userBuList.length > 0) {
  2465. this.notifyData.bu = this.userBuList[0].buNo
  2466. }
  2467. }
  2468. })
  2469. this.createNotifyFlag=true
  2470. },
  2471. //保存领料申请单
  2472. saveNotify(){
  2473. let buValue = this.notifyData.bu
  2474. let site = buValue.split('_')[0]
  2475. let bu = buValue.split('_')[1]
  2476. let inData={
  2477. site: site,
  2478. bu: bu,
  2479. userName:this.$store.state.user.name,
  2480. remark: this.notifyData.remark
  2481. }
  2482. createNotify(inData).then(({data})=>{
  2483. if (data.code === 0) {
  2484. this.$message({
  2485. message: '操作成功',
  2486. type: 'success',
  2487. duration: 1500,
  2488. onClose: () => {}
  2489. })
  2490. this.createNotifyFlag = false
  2491. // 刷新主表数据
  2492. this.searchTable()
  2493. // 清空表单数据
  2494. this.notifyData = {
  2495. site: '',
  2496. bu: '',
  2497. notifyNo: '',
  2498. notifyDate: '',
  2499. enteredDate: '',
  2500. userName: this.$store.state.user.name,
  2501. userDisplay: '',
  2502. remark: '',
  2503. planIssueDate: '',
  2504. }
  2505. }else {
  2506. this.$alert(data.msg, '错误', {
  2507. confirmButtonText: '确定'
  2508. })
  2509. }
  2510. })
  2511. },
  2512. //新增派工单明细
  2513. createOrderDetail(){
  2514. // 检查是否选择了主表行
  2515. /* if (!this.currentRow || !this.currentRow.notifyNo) {
  2516. this.$alert('请先选择一条主表记录!', '提示', {
  2517. confirmButtonText: '确定'
  2518. })
  2519. return false
  2520. } */
  2521. // 清除所有数据,设置默认值
  2522. this.orderDetailData = {
  2523. orderno: '',
  2524. seqno: '',
  2525. operationNo: '',
  2526. locationNo: '',
  2527. qtyrequired: '',
  2528. issureQty: 0,
  2529. partDesc: '',
  2530. partNo: '',
  2531. resourceId: '',
  2532. resourceDesc: '',
  2533. itemDesc: '',
  2534. itemNo: 0,
  2535. workCenterNo: '',
  2536. needDate: '',
  2537. materialType: 'BOM物料'
  2538. }
  2539. this.saveOrderDetailFlag = true
  2540. },
  2541. //编辑派工单明细
  2542. editOrderDetail(){
  2543. // 检查是否选择了明细行
  2544. if (!this.dataList2 || this.dataList2.length === 0) {
  2545. this.$alert('请先选择一条明细记录!', '提示', {
  2546. confirmButtonText: '确定'
  2547. })
  2548. return false
  2549. }
  2550. // 这里应该实现编辑逻辑
  2551. this.$message.warning('编辑功能待实现');
  2552. },
  2553. saveOrderDetail(){
  2554. // 数据验证
  2555. if (!this.orderDetailData.needDate) {
  2556. this.$alert('请选择要求发料时间!', '提示', {
  2557. confirmButtonText: '确定'
  2558. })
  2559. return false
  2560. }
  2561. if (!this.orderDetailData.issureQty || this.orderDetailData.issureQty <= 0) {
  2562. this.$alert('请填写领取数量!', '提示', {
  2563. confirmButtonText: '确定'
  2564. })
  2565. return false
  2566. }
  2567. let inData = {
  2568. site: this.currentRow.site,
  2569. bu: this.currentRow.bu,
  2570. notifyNo: this.currentRow.notifyNo,
  2571. orderno: this.orderDetailData.orderNo,
  2572. seqno: this.orderDetailData.seqNo,
  2573. operationNo: this.orderDetailData.operationNo,
  2574. locationNo: this.orderDetailData.locationNo,
  2575. qtyrequired: this.orderDetailData.qtyRequired,
  2576. issureQty: this.orderDetailData.issureQty,
  2577. partDesc: this.orderDetailData.partDesc,
  2578. partNo: this.orderDetailData.partNo,
  2579. resourceDesc: this.orderDetailData.resourceDesc,
  2580. resourceId: this.orderDetailData.resourceId,
  2581. itemDesc: this.orderDetailData.itemDesc,
  2582. itemNo: this.orderDetailData.itemNo,
  2583. workCenterNo: this.orderDetailData.workCenterNo,
  2584. needDate: this.orderDetailData.needDate,
  2585. username: this.$store.state.user.name,
  2586. }
  2587. // 这里应该调用相应的API来保存派工单数据
  2588. // 由于没有具体的API,我们先模拟成功
  2589. this.$message.success('保存成功')
  2590. this.saveOrderDetailFlag = false
  2591. // 刷新当前标签页数据
  2592. this.refreshCurrentTabTable()
  2593. // 清空表单数据
  2594. this.orderDetailData = {
  2595. orderno: '',
  2596. seqno: '',
  2597. operationNo: '',
  2598. locationNo: '',
  2599. qtyrequired: '',
  2600. issureQty: 0,
  2601. partDesc: '',
  2602. partNo: '',
  2603. resourceId: '',
  2604. resourceDesc: '',
  2605. itemDesc: '',
  2606. itemNo: 0,
  2607. workCenterNo: '',
  2608. needDate: '',
  2609. materialType: 'BOM物料'
  2610. }
  2611. },
  2612. //导出excel
  2613. async createExportData() {
  2614. this.searchData.limit = -1
  2615. this.searchData.page = 1
  2616. const {data} = await searchNotifyHeader(this.searchData)
  2617. return data.page.list;
  2618. },
  2619. startDownload() {
  2620. // this.exportData = this.dataList
  2621. },
  2622. finishDownload() {
  2623. },
  2624. fields() {
  2625. let json = "{"
  2626. this.columnList1.forEach((item, index) => {
  2627. if (index == this.columnList1.length - 1) {
  2628. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2629. } else {
  2630. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2631. }
  2632. })
  2633. json += "}"
  2634. let s = eval("(" + json + ")")
  2635. return s
  2636. },
  2637. tableRowClassName ({row, rowIndex}) {
  2638. if (row.qtyToIssueOriginal<row.qtyToIssue&&new Date(row.needDate)<new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
  2639. return 'error-row'
  2640. }
  2641. return ''
  2642. },
  2643. onMaterialTypeChange(value) {
  2644. // 清空相关字段
  2645. this.orderDetailData.orderNo = '';
  2646. this.orderDetailData.seqNo = '';
  2647. this.orderDetailData.operationNo = '';
  2648. this.orderDetailData.partNo = '';
  2649. this.orderDetailData.partDesc = '';
  2650. this.orderDetailData.locationNo = '';
  2651. this.orderDetailData.resourceId = '';
  2652. this.orderDetailData.resourceDesc = '';
  2653. this.orderDetailData.qtyRequired = '';
  2654. this.orderDetailData.itemDesc = '';
  2655. this.orderDetailData.itemNo = '';
  2656. this.orderDetailData.workCenterNo = '';
  2657. this.orderDetailData.issureQty = 0;
  2658. },
  2659. searchSOSRouting() {
  2660. // 调用API查询派工单信息
  2661. this.$message.warning('正在查询派工单信息...');
  2662. getSOScheduledRoutingListForIssure(this.chooseSOSData).then(({data}) => {
  2663. if (data.code === 0) {
  2664. this.chooseSOSList = data.rows;
  2665. if (this.chooseSOSList.length === 0) {
  2666. this.$message.warning('未查询到符合条件的派工单');
  2667. }
  2668. } else {
  2669. this.$message.error(data.msg || '查询失败');
  2670. }
  2671. }).catch(error => {
  2672. console.error('查询派工单失败:', error);
  2673. this.$message.error('查询失败,请稍后重试');
  2674. });
  2675. },
  2676. openChooseSOSModal() {
  2677. // 检查是否选择了主表行
  2678. if (!this.currentRow || !this.currentRow.notifyNo) {
  2679. this.$alert('请先选择一条主表记录!', '提示', {
  2680. confirmButtonText: '确定'
  2681. })
  2682. return false
  2683. }
  2684. // 初始化选择派工单数据
  2685. this.chooseSOSData = {
  2686. site: this.currentRow.site,
  2687. bu: this.currentRow.bu,
  2688. orderno: '',
  2689. seqno: '',
  2690. sResourceid: '',
  2691. startDate: this.dayjs().format('YYYY-MM-DD'),
  2692. endDate: this.dayjs().format('YYYY-MM-DD'),
  2693. }
  2694. // 清空选择列表
  2695. this.chooseSOSList = []
  2696. // 打开选择模态框
  2697. this.chooseSOSModalFlag = true
  2698. },
  2699. chooseSOS(row) {
  2700. // 关闭选择模态框
  2701. this.chooseSOSModalFlag = false
  2702. // 将选择的数据填入到保存派工单模态框中
  2703. this.orderDetailData.orderNo = row.orderno || row.orderNo || '';
  2704. this.orderDetailData.seqNo = row.seqno || row.seqNo || '';
  2705. this.orderDetailData.operationNo = row.operationNo || row.operation || '';
  2706. this.orderDetailData.locationNo = row.sResourceid || row.locationNo || '';
  2707. this.orderDetailData.qtyRequired = row.qtyrequired || row.qtyToIssue || '';
  2708. this.orderDetailData.partDesc = row.partDesc || '';
  2709. this.orderDetailData.partNo = row.partNo || row.fGPartNo || '';
  2710. this.orderDetailData.workCenterNo = row.workCenterNo || '';
  2711. this.orderDetailData.needDate = row.startDate || this.dayjs().format('YYYY-MM-DD HH:mm:ss');
  2712. // 根据物料类型设置
  2713. if (row.issueType === '非BOM物料') {
  2714. this.orderDetailData.materialType = '非BOM物料';
  2715. } else {
  2716. this.orderDetailData.materialType = 'BOM物料';
  2717. }
  2718. this.$message.success('选择派工单成功,数据已填入表单');
  2719. },
  2720. //工单选择部分
  2721. // 打开选择工单模态框
  2722. openChooseOrderModal() {
  2723. // 检查是否选择了主表行
  2724. if (!this.currentRow || !this.currentRow.notifyNo) {
  2725. this.$alert('请先选择一条主表记录!', '提示', {
  2726. confirmButtonText: '确定'
  2727. })
  2728. return false
  2729. }
  2730. // 初始化选择工单数据
  2731. this.chooseOrderData = {
  2732. page: 1,
  2733. limit: 100,
  2734. site: this.currentRow.site,
  2735. buNo: this.currentRow.bu,
  2736. user: this.$store.state.user.name,
  2737. orderNo: '',
  2738. statusList: ['已下达', '已计划', '已排产'],
  2739. date3: this.dayjs().format('YYYY-MM-DD'),
  2740. date4: this.dayjs().format('YYYY-MM-DD'),
  2741. }
  2742. // 清空选择列表
  2743. this.chooseOrderList = []
  2744. // 打开选择模态框
  2745. this.chooseOrderModalFlag = true
  2746. },
  2747. // 查询工单信息
  2748. searchOrder() {
  2749. this.chooseOrderData.limit = this.co_pageSize
  2750. this.chooseOrderData.page = this.co_pageIndex
  2751. searchShopOrderByPaging(this.chooseOrderData).then(({data}) => {
  2752. if (data.code === 0) {
  2753. this.chooseOrderList = data.page.list;
  2754. if (this.chooseOrderList.length === 0) {
  2755. this.$message.warning('未查询到符合条件的工单');
  2756. }
  2757. this.co_pageIndex = data.page.currPage
  2758. this.co_pageSize = data.page.pageSize
  2759. this.co_totalPage = data.page.totalCount
  2760. } else {
  2761. this.chooseOrderList = [];
  2762. this.$message.error(data.msg || '查询失败');
  2763. }
  2764. }).catch(error => {
  2765. this.chooseOrderList = [];
  2766. console.error('查询工单失败:', error);
  2767. this.$message.error('查询失败,请稍后重试');
  2768. });
  2769. },
  2770. // 每页数 工单分页信息
  2771. coSizeChangeHandle(val) {
  2772. this.co_pageSize = val
  2773. this.searchOrder()
  2774. },
  2775. // 当前页 工单分页信息
  2776. co_currentChangeHandle(val) {
  2777. this.co_pageIndex = val
  2778. this.searchOrder()
  2779. },
  2780. // 选择工单
  2781. chooseOrder(row) {
  2782. // 关闭选择模态框
  2783. this.chooseOrderModalFlag = false
  2784. // 将选择的数据填入到保存派工单模态框中
  2785. this.orderDetailData.orderNo = row.orderNo || '';
  2786. this.orderDetailData.partNo = row.partNo || '';
  2787. this.orderDetailData.partDesc = row.partDescription || '';
  2788. this.orderDetailData.qtyRequired = row.lotSize || '';
  2789. // 清空相关字段
  2790. this.orderDetailData.seqNo = '';
  2791. this.orderDetailData.operationNo = '';
  2792. this.orderDetailData.locationNo = '';
  2793. },
  2794. //工序选择部分
  2795. // 打开选择工序模态框
  2796. openChooseOperationModal() {
  2797. // 检查是否选择了工单
  2798. if (!this.orderDetailData.orderNo) {
  2799. this.$alert('请先选择工单!', '提示', {
  2800. confirmButtonText: '确定'
  2801. })
  2802. return false
  2803. }
  2804. // 初始化选择工序数据
  2805. this.chooseOperationData = {
  2806. orderNo: this.orderDetailData.orderNo,
  2807. site: this.currentRow.site,
  2808. }
  2809. // 清空选择列表
  2810. this.chooseOperationList = []
  2811. // 打开选择模态框
  2812. this.chooseOperationModalFlag = true
  2813. },
  2814. // 查询工序信息
  2815. searchOperation() {
  2816. // 调用API查询工序信息
  2817. getRouteInShopOrder(this.chooseOperationData).then(({data}) => {
  2818. if (data.code === 0) {
  2819. this.chooseOperationList = data.dataList;
  2820. if (this.chooseOperationList.length === 0) {
  2821. this.$message.warning('未查询到符合条件的工序');
  2822. }
  2823. } else {
  2824. // 清空选择列表
  2825. this.chooseOperationList = [];
  2826. this.$message.error(data.msg || '查询失败');
  2827. }
  2828. }).catch(error => {
  2829. // 清空选择列表
  2830. this.chooseOperationList = [];
  2831. console.error('查询工序失败:', error);
  2832. this.$message.error('查询失败,请稍后重试');
  2833. });
  2834. },
  2835. // 选择工序
  2836. chooseOperation(row) {
  2837. // 关闭选择模态框
  2838. this.chooseOperationModalFlag = false
  2839. // 将选择的数据填入到保存派工单模态框中
  2840. this.orderDetailData.itemDesc = row.operationDesc || '';
  2841. this.orderDetailData.itemNo = row.itemNo || '';
  2842. this.orderDetailData.workCenterNo = row.workCenterNo || '';
  2843. this.$message.success('操作成功');
  2844. },
  2845. //机台选择部分
  2846. // 打开选择机台模态框
  2847. openChooseResourceModal() {
  2848. // 检查是否选择了工单
  2849. if (!this.orderDetailData.orderNo) {
  2850. this.$alert('请先选择工单!', '提示', {
  2851. confirmButtonText: '确定'
  2852. })
  2853. return false
  2854. }
  2855. // 初始化选择机台数据
  2856. this.chooseResourceData = {
  2857. site: this.currentRow.site,
  2858. workCenterNo: this.orderDetailData.workCenterNo,
  2859. resourceID: '',
  2860. resourceDesc: '',
  2861. }
  2862. // 清空选择列表
  2863. this.chooseResourceList = []
  2864. // 打开选择模态框
  2865. this.chooseResourceModalFlag = true
  2866. },
  2867. // 查询机台信息
  2868. searchResource() {
  2869. // 调用API查询机台信息
  2870. searchAllResource(this.chooseResourceData).then(({data}) => {
  2871. if (data.code === 0) {
  2872. this.chooseResourceList = data.rows;
  2873. if (this.chooseResourceList.length === 0) {
  2874. this.$message.warning('未查询到符合条件的机台');
  2875. }
  2876. } else {
  2877. // 清空选择列表
  2878. this.chooseResourceList = [];
  2879. this.$message.error(data.msg || '查询失败');
  2880. }
  2881. }).catch(error => {
  2882. // 清空选择列表
  2883. this.chooseResourceList = [];
  2884. console.error('查询机台失败:', error);
  2885. this.$message.error('查询失败,请稍后重试');
  2886. });
  2887. },
  2888. // 选择机台
  2889. chooseResource(row) {
  2890. // 关闭选择模态框
  2891. this.chooseResourceModalFlag = false
  2892. // 将选择的数据填入到保存派工单模态框中
  2893. this.orderDetailData.resourceId = row.resourceId || '';
  2894. this.orderDetailData.resourceDesc = row.resourceDesc || '';
  2895. this.$message.success('操作成功');
  2896. },
  2897. //非BOM物料选择部分
  2898. // 打开选择物料模态框
  2899. openChoosePartModal() {
  2900. // 检查是否选择了主表行
  2901. if (!this.currentRow || !this.currentRow.notifyNo) {
  2902. this.$alert('请先选择一条主表记录!', '提示', {
  2903. confirmButtonText: '确定'
  2904. })
  2905. return false
  2906. }
  2907. // 初始化选择物料数据
  2908. this.choosePartData = {
  2909. site: this.currentRow.site,
  2910. sourceBu: this.currentRow.bu,
  2911. partNo: '',
  2912. partDesc: '',
  2913. spec: '',
  2914. }
  2915. // 清空选择列表
  2916. this.choosePartList = []
  2917. // 打开选择模态框
  2918. this.choosePartModalFlag = true
  2919. },
  2920. // 查询物料信息
  2921. searchPartModel() {
  2922. // 调用API查询物料信息
  2923. this.$message.warning('正在查询物料信息...');
  2924. getPartList(this.choosePartData).then(({data}) => {
  2925. if (data.code === 0) {
  2926. this.choosePartList = data.rows;
  2927. if (this.choosePartList.length === 0) {
  2928. this.$message.warning('未查询到符合条件的物料');
  2929. }
  2930. } else {
  2931. this.$message.error(data.msg || '查询失败');
  2932. }
  2933. }).catch(error => {
  2934. console.error('查询物料失败:', error);
  2935. this.$message.error('查询失败,请稍后重试');
  2936. });
  2937. },
  2938. // 选择物料
  2939. choosePart(row) {
  2940. // 关闭选择模态框
  2941. this.choosePartModalFlag = false
  2942. // 将选择的数据填入到保存派工单模态框中
  2943. this.orderDetailData.partNo = row.partNo || '';
  2944. this.orderDetailData.partDesc = row.partDesc || '';
  2945. this.orderDetailData.materialType = '非BOM物料';
  2946. this.$message.success('选择物料成功,数据已填入表单');
  2947. },
  2948. },
  2949. }
  2950. </script>
  2951. <style scoped>
  2952. /deep/ .el-form-item--medium .el-form-item__content {
  2953. height: auto;
  2954. }
  2955. .disabled {
  2956. cursor: not-allowed !important;
  2957. color: #C0C4CC !important;
  2958. pointer-events: none;
  2959. }
  2960. .text-right >>> .el-input__inner {
  2961. text-align: right !important;
  2962. }
  2963. .text-right >>> .el-input-number__input {
  2964. text-align: right !important;
  2965. }
  2966. .single-line-multi-select >>> .el-select__tags {
  2967. display: flex;
  2968. flex-wrap: nowrap;
  2969. overflow: hidden;
  2970. white-space: nowrap;
  2971. max-width: 100%;
  2972. }
  2973. .single-line-multi-select >>> .el-tag {
  2974. flex-shrink: 0;
  2975. max-width: 100px;
  2976. overflow: hidden;
  2977. text-overflow: ellipsis;
  2978. white-space: nowrap;
  2979. }
  2980. .single-line-multi-select >>> .el-select__input {
  2981. flex-shrink: 0;
  2982. min-width: 30px;
  2983. }
  2984. </style>