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.

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