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.

3333 lines
112 KiB

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