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.

1991 lines
66 KiB

3 months ago
1 month ago
3 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-input v-model="searchData.orderNo" style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item label="状态">
  15. <el-select v-model="searchData.status" placeholder="请选择" style="width: 120px">
  16. <el-option label="全部" value=""></el-option>
  17. <el-option label="ISSUE" value="ISSUE"></el-option>
  18. <el-option label="CANCEL" value="CANCEL"></el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item :label="'申请单日期'">
  22. <el-date-picker style="width: 120px" v-model="searchData.startDate" type="date" value-format="yyyy-MM-dd"
  23. placeholder="选择日期">
  24. </el-date-picker>
  25. </el-form-item>
  26. <el-form-item style="margin-top: 23px;">
  27. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  28. </el-form-item>
  29. <el-form-item :label="' '">
  30. <el-date-picker style="width: 120px" v-model="searchData.endDate" type="date" value-format="yyyy-MM-dd"
  31. placeholder="选择日期">
  32. </el-date-picker>
  33. </el-form-item>
  34. <el-form-item label="推送WCS">
  35. <el-select v-model="searchData.pushWcsFlag" placeholder="请选择" style="width: 120px">
  36. <el-option label="全部" value=""></el-option>
  37. <el-option label="未推送" value="未推送"></el-option>
  38. <el-option label="部分推送" value="部分推送"></el-option>
  39. <el-option label="推送完成" value="推送完成"></el-option>
  40. <el-option label="出库完成" value="出库完成"></el-option>
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item :label="' '">
  44. <el-button type="primary" @click="searchTable()">查询</el-button>
  45. <!-- <el-button type="primary" @click="createNotifyModal()">新增</el-button> -->
  46. <download-excel :fields="fields()" :data="exportData" type="xls" :name="exportName" :header="exportHeader"
  47. :footer="exportFooter" :fetch="createExportData" :before-generate="startDownload"
  48. :before-finish="finishDownload" worksheet="导出信息" class="el-button el-button--primary el-button--medium">
  49. {{ '导出' }}
  50. </download-excel>
  51. </el-form-item>
  52. </el-form>
  53. </el-form>
  54. <el-table :data="dataList" @row-click="changeData" :height="height" border highlight-current-row ref="mainTable"
  55. v-loading="dataListLoading" style="width: 100%; ">
  56. <el-table-column v-for="(item,index) in columnList1" :key="index" :sortable="item.columnSortable"
  57. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  58. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  59. :label="item.columnLabel">
  60. <template slot-scope="scope">
  61. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  62. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  63. style="width: 100px; height: 80px" /></span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column header-align="center" align="center" width="180" label="操作">
  67. <template slot-scope="scope">
  68. <a type="text" size="small" v-if="scope.row.status==='ISSUE'" @click="closeNotifyModel(scope.row)">关闭</a>
  69. <a type="text" size="small" v-if="scope.row.status==='CLOSED'" @click="openNotify(scope.row)">开启</a>
  70. <a type="text" size="small"
  71. v-if="scope.row.pushWcsFlag!=='出库完成'&&scope.row.pushWcsFlag!=='推送完成'&&scope.row.status==='ISSUE'"
  72. @click="previewInventory(scope.row)" style="margin-left: 10px;">推送WCS</a>
  73. <!-- rqrq - 取消下达按钮只在状态为ISSUE且未推送WCS时显示 -->
  74. <a type="text" size="small" v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'"
  75. @click="cancelIssueNotifyHandle(scope.row)" style="margin-left: 10px;">取消下达</a>
  76. <!-- <a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="pushToWcs(scope.row)" style="margin-left: 10px;">推送WCS</a>-->
  77. </template>
  78. </el-table-column>
  79. </el-table>
  80. <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
  81. :page-sizes="[20, 50, 100, 1000]" :page-size="pageSize" :total="totalPage"
  82. layout="total, sizes, prev, pager, next, jumper">
  83. </el-pagination>
  84. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card"
  85. @tab-click="tabClick">
  86. <el-tab-pane label="申请单明细" name="detail">
  87. <el-table :data="dataList2" :height="height" border v-loading="dataListLoading" style="width: 100%; ">
  88. <!-- <el-table-column-->
  89. <!-- header-align="center"-->
  90. <!-- align="center"-->
  91. <!-- width="80"-->
  92. <!-- label="操作">-->
  93. <!-- <template slot-scope="scope">-->
  94. <!-- <a type="text" size="small" v-if="currentRow.status==='ISSUE'" @click="deleteNotifySOSPlus(scope.row)">删除</a>-->
  95. <!-- </template>-->
  96. <!-- </el-table-column>-->
  97. <el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
  98. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  99. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  100. :label="item.columnLabel">
  101. <template slot-scope="scope">
  102. <!-- rqrq - 是否推送WCS特殊显示Y显示绿色"是"否则显示灰色"否" -->
  103. <span v-if="item.columnProp === 'pushWmsFlag'"
  104. :style="{color: scope.row.pushWmsFlag === 'Y' ? '#67C23A' : '#909399'}">
  105. {{ scope.row.pushWmsFlag === 'Y' ? '是' : '否' }}
  106. </span>
  107. <!-- rqrq - 立库取出特殊显示Y显示绿色"是"否则显示灰色"否" -->
  108. <span v-else-if="item.columnProp === 'transportFlag'"
  109. :style="{color: scope.row.transportFlag === 'Y' ? '#67C23A' : '#909399'}">
  110. {{ scope.row.transportFlag === 'Y' ? '是' : '否' }}
  111. </span>
  112. <!-- 普通列显示 -->
  113. <span v-else-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  114. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  115. style="width: 100px; height: 80px" /></span>
  116. </template>
  117. </el-table-column>
  118. <!-- 操作列 -->
  119. <el-table-column fixed="right" header-align="center" align="center" width="120" label="操作">
  120. <template slot-scope="scope">
  121. <a type="text" size="small"
  122. v-if="scope.row.pushWmsFlag !== 'Y' && currentRow && currentRow.pushWcsFlag === '未推送'"
  123. @click="enterSOSDetail(scope.row)" style="margin-right: 10px;">修改</a>
  124. <a type="text" size="small"
  125. v-if="scope.row.pushWmsFlag !== 'Y' && currentRow && currentRow.pushWcsFlag === '未推送'"
  126. @click="deleteNotifySOSPlus(scope.row)">删除</a>
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. </el-tab-pane>
  131. <el-tab-pane label="材料明细" name="sub">
  132. <el-table :data="dataList3" :height="height" border :row-class-name="tableRowClassName"
  133. v-loading="dataListLoading" @row-dblclick="handleMaterialRowDblClick" style="width: 100%; ">
  134. <!-- <el-table-column-->
  135. <!-- header-align="center"-->
  136. <!-- align="center"-->
  137. <!-- width="80"-->
  138. <!-- label="操作">-->
  139. <!-- <template slot-scope="scope">-->
  140. <!-- <a type="text" size="small" v-if="currentRow.status==='ISSUE'" @click="deleteNotifyMaterial(scope.row)">删除</a>-->
  141. <!-- </template>-->
  142. <!-- </el-table-column>-->
  143. <el-table-column v-for="(item,index) in columnList3" :key="index" :sortable="item.columnSortable"
  144. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  145. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  146. :label="item.columnLabel">
  147. <template slot-scope="scope">
  148. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  149. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  150. style="width: 100px; height: 80px" /></span>
  151. </template>
  152. </el-table-column>
  153. </el-table>
  154. </el-tab-pane>
  155. <el-tab-pane label="材料汇总" name="sum">
  156. <el-table :data="dataList4" :height="height" border v-loading="dataListLoading" style="width: 100%; ">
  157. <!-- <el-table-column-->
  158. <!-- header-align="center"-->
  159. <!-- align="center"-->
  160. <!-- width="80"-->
  161. <!-- fixed="left"-->
  162. <!-- label="操作">-->
  163. <!-- <template slot-scope="scope">-->
  164. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  165. <!-- </template>-->
  166. <!-- </el-table-column>-->
  167. <el-table-column v-for="(item,index) in columnList4" :key="index" :sortable="item.columnSortable"
  168. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  169. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  170. :label="item.columnLabel">
  171. <template slot-scope="scope">
  172. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  173. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  174. style="width: 100px; height: 80px" /></span>
  175. </template>
  176. </el-table-column>
  177. </el-table>
  178. </el-tab-pane>
  179. <el-tab-pane label="预留标签清单" name="labelDetail">
  180. <el-table :data="dataList7" :height="height" border v-loading="dataListLoading" style="width: 100%; ">
  181. <el-table-column v-for="(item,index) in columnList6" :key="index" :sortable="item.columnSortable"
  182. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  183. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  184. :label="item.columnLabel">
  185. <template slot-scope="scope">
  186. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  187. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  188. style="width: 100px; height: 80px" /></span>
  189. </template>
  190. </el-table-column>
  191. </el-table>
  192. </el-tab-pane>
  193. </el-tabs>
  194. <el-dialog title="关闭原因" :close-on-click-modal="false" v-drag :visible.sync="closeModalFlag" width="450px">
  195. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  196. <el-row :gutter="20">
  197. <el-col :span="24">
  198. <el-form-item>
  199. <el-input type="textarea" v-model="closeData.closeRemark " :rows="3" resize='none' maxlength="200"
  200. show-word-limit style="height: 60px">
  201. </el-input>
  202. </el-form-item>
  203. </el-col>
  204. </el-row>
  205. </el-form>
  206. <el-footer style="height:40px;margin-top: 60px;text-align:center">
  207. <el-button type="primary" @click="closeNotify()">保存</el-button>
  208. <el-button type="primary" @click="closeModalFlag=false">关闭</el-button>
  209. </el-footer>
  210. </el-dialog>
  211. <!-- 物料明细对话框 -->
  212. <el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="900px">
  213. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  214. <el-row :gutter="20">
  215. <el-col :span="6">
  216. <el-form-item :label="'生产订单号'">
  217. <el-input v-model="sobomData.orderNo" disabled></el-input>
  218. </el-form-item>
  219. </el-col>
  220. <el-col :span="6">
  221. <el-form-item :label="'产品编码'">
  222. <el-input v-model="sobomData.partNo" disabled></el-input>
  223. </el-form-item>
  224. </el-col>
  225. </el-row>
  226. </el-form>
  227. <div class="yzzTable">
  228. <el-table :height="400" :data="sobomList" border v-loading="bomLoadFlag" style="width: 100%;">
  229. <el-table-column prop="componentPartNo" label="物料编码" sortable headerAlign="center" width="120" align="left">
  230. </el-table-column>
  231. <el-table-column prop="componentPartDesc" label="物料描述" headerAlign="center" width="200" align="left"
  232. show-overflow-tooltip>
  233. </el-table-column>
  234. <el-table-column prop="qtyRequired" label="需求数量" headerAlign="center" width="100" align="right">
  235. </el-table-column>
  236. <!-- rqrq - 新增可用库存列 -->
  237. <el-table-column prop="availableQty" label="可用库存" headerAlign="center" width="100" align="right">
  238. <template slot-scope="scope">
  239. <span
  240. :style="{fontWeight: 'bold', color: (scope.row.availableQty < scope.row.qtyRequired) ? '#F56C6C' : ''}">
  241. {{ scope.row.availableQty }}
  242. </span>
  243. </template>
  244. </el-table-column>
  245. <el-table-column prop="qtyToIssue" label="本次申请数量" headerAlign="center" width="120" align="right">
  246. <template slot-scope="scope">
  247. <el-input v-model="scope.row.qtyToIssue" type="number" style="height: 11px; width: 98%;" :step="0"
  248. :min="0"></el-input>
  249. </template>
  250. </el-table-column>
  251. <el-table-column prop="remark" label="备注" headerAlign="center" width="200" align="left">
  252. <template slot-scope="scope">
  253. <el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
  254. </template>
  255. </el-table-column>
  256. <el-table-column prop="" header-align="center" align="center" min-width="80" label="操作">
  257. <template slot-scope="scope">
  258. <el-button type="primary" @click="qtyAllForBom(scope.row)" style="width: 100%">全数领料</el-button>
  259. </template>
  260. </el-table-column>
  261. </el-table>
  262. </div>
  263. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  264. <el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
  265. <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
  266. </el-footer>
  267. </el-dialog>
  268. <!-- 编辑材料明细对话框 -->
  269. <el-dialog title="编辑材料明细" :close-on-click-modal="false" v-drag :visible.sync="editMaterialModalFlag" width="600px">
  270. <el-form :inline="true" label-position="top" label-width="120px" style="margin-top: 20px;">
  271. <el-row>
  272. <el-col span="8">
  273. <el-form-item label="申请单序号">
  274. <el-input v-model="editMaterialData.itemNo" disabled></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col span="8">
  278. <el-form-item label="材料编码">
  279. <el-input v-model="editMaterialData.componentPartNo" disabled></el-input>
  280. </el-form-item>
  281. </el-col>
  282. <el-col span="8">
  283. <el-form-item label="生产订单">
  284. <el-input v-model="editMaterialData.soorderNo" disabled></el-input>
  285. </el-form-item>
  286. </el-col>
  287. </el-row>
  288. <el-row>
  289. <el-col span="8">
  290. <el-form-item label="需求时间">
  291. <el-input v-model="editMaterialData.needDate" disabled></el-input>
  292. </el-form-item>
  293. </el-col>
  294. <el-col span="8">
  295. <el-form-item label="申请数量" required>
  296. <el-input v-model="editMaterialData.qtyToIssue" :min="0" style="width: 98%;" @input="value => editMaterialData.qtyToIssue = value
  297. .replace(/[^\d.]/g, '')
  298. .replace(/\.{2,}/g, '.')
  299. .replace(/^\./, '0.')
  300. .replace(/(\.\d{4}).*/, '$1')
  301. .replace(/^0+(?=\d)/, '0')
  302. .replace(/^0+(?=\.)/, '0')"></el-input>
  303. </el-form-item>
  304. </el-col>
  305. <el-col span="8">
  306. <el-form-item label="类型">
  307. <el-input v-model="editMaterialData.issueType" disabled></el-input>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. </el-form>
  312. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  313. <el-button type="primary" @click="saveEditMaterialDetail()">保存</el-button>
  314. <el-button type="primary" @click="editMaterialModalFlag=false">关闭</el-button>
  315. </el-footer>
  316. </el-dialog>
  317. <!-- 库存预览模态框 -->
  318. <el-dialog title="库存匹配预览" :visible.sync="previewDialogVisible" width="80%" :close-on-click-modal="false">
  319. <el-table :data="previewData" border v-loading="previewLoading" style="width: 100%;" height="300"
  320. :row-class-name="getRowClassName">
  321. <el-table-column prop="rowNo" label="行号" width="80" align="center">
  322. </el-table-column>
  323. <el-table-column prop="productionOrderNo" label="生产订单号" width="100" sortable align="center">
  324. </el-table-column>
  325. <el-table-column prop="bomLineNo" label="BOM行号" width="100" sortable align="center">
  326. </el-table-column>
  327. <el-table-column prop="partNo" label="物料编码" width="100" sortable align="center">
  328. </el-table-column>
  329. <el-table-column prop="requiredQty" label="需求数量" width="80" align="center">
  330. </el-table-column>
  331. <el-table-column prop="isWarehouseSatisfied" label="立库是否满足" width="100" align="center">
  332. <template slot-scope="scope">
  333. <span :style="{color: scope.row.isWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
  334. {{ scope.row.isWarehouseSatisfied === 'Y' ? '是' : '否' }}
  335. </span>
  336. </template>
  337. </el-table-column>
  338. <el-table-column prop="isOtherWarehouseSatisfied" label="分切仓库是否满足" width="120" align="center">
  339. <template slot-scope="scope">
  340. <span v-if="scope.row.isOtherWarehouseSatisfied"
  341. :style="{color: scope.row.isOtherWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
  342. {{ scope.row.isOtherWarehouseSatisfied === 'Y' ? '是' : '否' }}
  343. </span>
  344. </template>
  345. </el-table-column>
  346. <el-table-column prop="matchedBarcodes" label="匹配条码" min-width="300" align="left" class-name="wrap-text-column">
  347. <template slot-scope="scope">
  348. <div style="white-space: normal; word-break: break-all; line-height: 1.5;">
  349. {{ scope.row.matchedBarcodes }}
  350. </div>
  351. </template>
  352. </el-table-column>
  353. </el-table>
  354. <span slot="footer" class="dialog-footer">
  355. <el-button type="primary" class="yzzButtonAn" @click="pushToWCS" :disabled="previewLoading">
  356. {{ previewLoading ? '推送中...' : '推送至WCS' }}
  357. </el-button>
  358. <el-button @click="previewDialogVisible = false" :disabled="previewLoading">关闭</el-button>
  359. </span>
  360. </el-dialog>
  361. </div>
  362. </template>
  363. <script>
  364. import {
  365. searchNotifyHeaderNew,
  366. getSOSBOMForIssureNew,
  367. saveMaterialDetail,
  368. deleteNotifySOSPlus,
  369. } from '@/api/poorder/poorderIssueNotify.js'
  370. import {
  371. searchNotifyOrderListNew,
  372. searchNotifyMaterialListNew,
  373. searchSumNotifyMaterialListNew,
  374. updateNotifyStatusNew,
  375. deleteNotifyMaterial,
  376. searchNotifyLogNew,
  377. searchNotifyLogCloseNew,
  378. pushNotifyToWcs,
  379. checkIssueNotifyInventory,
  380. pushInventoryToWcs,
  381. checkUserHasUnissueShopOrder,
  382. cancelIssueNotify,
  383. searchMaterialListDetail,
  384. updateMaterialDetail,
  385. } from '@/api/orderIssure/soIssueNotify.js'
  386. export default {
  387. data() {
  388. return {
  389. height: 200,
  390. activeName: 'detail',
  391. dataList: [],
  392. dataList2: [],
  393. dataList3: [],
  394. dataList4: [],
  395. dataList5: [],
  396. dataList6: [],
  397. dataList7: [], // 预留标签清单数据 - rqrq
  398. userBuList: [],
  399. createNotifyFlag: false,
  400. saveOrderDetailFlag: false,
  401. closeData: {
  402. site: '',
  403. notifyNo: '',
  404. closeRemark: '',
  405. username: this.$store.state.user.name,
  406. },
  407. closeModalFlag: false,
  408. searchData: {
  409. page: 1,
  410. limit: 100,
  411. site: '',
  412. userName: '',
  413. notifyNo: '',
  414. status: '',
  415. pushWcsFlag: '', // rqrq - 推送WCS筛选条件
  416. loginUserName: this.$store.state.user.name,
  417. startDate: this.dayjs().format('YYYY-MM-DD'),
  418. endDate: this.dayjs().format('YYYY-MM-DD'),
  419. issueStartDate: this.dayjs().format('YYYY-MM-DD'),
  420. issueEndDate: this.dayjs().format('YYYY-MM-DD') + ' 23:59:59',
  421. sql: '',
  422. orderNo: '',
  423. orderType: 'poorder', // rqrq - 默认查询shoporder类型
  424. },
  425. notifyData: {
  426. site: '',
  427. bu: '',
  428. notifyNo: '',
  429. notifyDate: '',
  430. enteredDate: '',
  431. userName: this.$store.state.user.name,
  432. userDisplay: '',
  433. remark: '',
  434. planIssueDate: '',
  435. outWorkOrderFlag: false,
  436. },
  437. pageIndex: 1,
  438. pageSize: 100,
  439. totalPage: 0,
  440. //工单分页
  441. co_pageIndex: 1,
  442. co_pageSize: 100,
  443. co_totalPage: 0,
  444. dataListLoading: false,
  445. currentRow: '',
  446. columnList1: [
  447. {
  448. userId: this.$store.state.user.name,
  449. functionId: 701002,
  450. serialNumber: '701002Table1NotifyNo',
  451. tableId: '701002Table1',
  452. tableName: '领料申请主表',
  453. columnProp: 'notifyNo',
  454. headerAlign: 'center',
  455. align: 'center',
  456. columnLabel: '申请单单号',
  457. columnHidden: false,
  458. columnImage: false,
  459. columnSortable: false,
  460. sortLv: 0,
  461. status: true,
  462. fixed: '',
  463. columnWidth: 100,
  464. },
  465. {
  466. userId: this.$store.state.user.name,
  467. functionId: 701002,
  468. serialNumber: '701002Table1NotifyDate',
  469. tableId: '701002Table1',
  470. tableName: '领料申请主表',
  471. columnProp: 'notifyDate',
  472. headerAlign: 'center',
  473. align: 'center',
  474. columnLabel: '申请日期',
  475. columnHidden: false,
  476. columnImage: false,
  477. columnSortable: false,
  478. sortLv: 0,
  479. status: true,
  480. fixed: '',
  481. columnWidth: 100,
  482. },
  483. {
  484. userId: this.$store.state.user.name,
  485. functionId: 701002,
  486. serialNumber: '701002Table1UserName',
  487. tableId: '701002Table1',
  488. tableName: '领料申请主表',
  489. columnProp: 'username',
  490. headerAlign: 'center',
  491. align: 'left',
  492. columnLabel: '申请账号',
  493. columnHidden: false,
  494. columnImage: false,
  495. columnSortable: false,
  496. sortLv: 0,
  497. status: true,
  498. fixed: '',
  499. columnWidth: 100,
  500. },
  501. {
  502. userId: this.$store.state.user.name,
  503. functionId: 701002,
  504. serialNumber: '701002Table1EnteredDate',
  505. tableId: '701002Table1',
  506. tableName: '领料申请主表',
  507. columnProp: 'enteredDate',
  508. headerAlign: 'center',
  509. align: 'center',
  510. columnLabel: '录入时间',
  511. columnHidden: false,
  512. columnImage: false,
  513. columnSortable: false,
  514. sortLv: 0,
  515. status: true,
  516. fixed: '',
  517. columnWidth: 120,
  518. },
  519. {
  520. userId: this.$store.state.user.name,
  521. functionId: 701002,
  522. serialNumber: '701002Table1Status',
  523. tableId: '701002Table1',
  524. tableName: '领料申请主表',
  525. columnProp: 'status',
  526. headerAlign: 'center',
  527. align: 'left',
  528. columnLabel: '状态',
  529. columnHidden: false,
  530. columnImage: false,
  531. columnSortable: false,
  532. sortLv: 0,
  533. status: true,
  534. fixed: '',
  535. columnWidth: 80,
  536. },
  537. {
  538. userId: this.$store.state.user.name,
  539. functionId: 701002,
  540. serialNumber: '701002Table1ConfirmStatus',
  541. tableId: '701002Table1',
  542. tableName: '领料申请主表',
  543. columnProp: 'confirmStatus',
  544. headerAlign: 'center',
  545. align: 'center',
  546. columnLabel: '确认状态',
  547. columnHidden: false,
  548. columnImage: false,
  549. columnSortable: false,
  550. sortLv: 0,
  551. status: true,
  552. fixed: '',
  553. columnWidth: 80,
  554. },
  555. {
  556. userId: this.$store.state.user.name,
  557. functionId: 701002,
  558. serialNumber: '701002Table1WcsPushFlag',
  559. tableId: '701002Table1',
  560. tableName: '领料申请主表',
  561. columnProp: 'pushWcsFlag',
  562. headerAlign: 'center',
  563. align: 'left',
  564. columnLabel: '推送WCS',
  565. columnHidden: false,
  566. columnImage: false,
  567. columnSortable: false,
  568. sortLv: 0,
  569. status: true,
  570. fixed: '',
  571. columnWidth: 80,
  572. },
  573. {
  574. userId: this.$store.state.user.name,
  575. functionId: 701002,
  576. serialNumber: '701002Table1Remark',
  577. tableId: '701002Table1',
  578. tableName: '领料申请主表',
  579. columnProp: 'remark',
  580. headerAlign: 'center',
  581. align: 'left',
  582. columnLabel: '备注',
  583. columnHidden: false,
  584. columnImage: false,
  585. columnSortable: false,
  586. sortLv: 0,
  587. status: true,
  588. fixed: '',
  589. columnWidth: 200,
  590. },
  591. ],
  592. columnList2: [
  593. {
  594. userId: this.$store.state.user.name,
  595. functionId: 701002,
  596. serialNumber: '701002Table2ItemNo',
  597. tableId: '701002Table2',
  598. tableName: '申请单派工单明细表',
  599. columnProp: 'itemNo',
  600. headerAlign: 'center',
  601. align: 'right',
  602. columnLabel: '序号',
  603. columnHidden: false,
  604. columnImage: false,
  605. columnSortable: false,
  606. sortLv: 0,
  607. status: true,
  608. fixed: '',
  609. columnWidth: 40,
  610. },
  611. {
  612. userId: this.$store.state.user.name,
  613. functionId: 701002,
  614. serialNumber: '701002Table2NeedDate',
  615. tableId: '701002Table2',
  616. tableName: '领料申请派工单子表',
  617. columnProp: 'needDate',
  618. headerAlign: 'center',
  619. align: 'left',
  620. columnLabel: '要求发料时间',
  621. columnHidden: false,
  622. columnImage: false,
  623. columnSortable: false,
  624. sortLv: 0,
  625. status: true,
  626. fixed: '',
  627. columnWidth: 80,
  628. },
  629. {
  630. userId: this.$store.state.user.name,
  631. functionId: 701002,
  632. serialNumber: '701002Table2PushWcsTime',
  633. tableId: '701002Table2',
  634. tableName: '领料申请派工单子表',
  635. columnProp: 'pushWcsTime',
  636. headerAlign: 'center',
  637. align: 'center',
  638. columnLabel: '推送WCS时间',
  639. columnHidden: false,
  640. columnImage: false,
  641. columnSortable: false,
  642. sortLv: 0,
  643. status: true,
  644. fixed: '',
  645. columnWidth: 130,
  646. },
  647. {
  648. userId: this.$store.state.user.name,
  649. functionId: 701002,
  650. serialNumber: '701002Table2SOOrderNo',
  651. tableId: '701002Table2',
  652. tableName: '申请单派工单明细表',
  653. columnProp: 'soorderNo',
  654. headerAlign: 'center',
  655. align: 'left',
  656. columnLabel: '生产订单',
  657. columnHidden: false,
  658. columnImage: false,
  659. columnSortable: false,
  660. sortLv: 0,
  661. status: true,
  662. fixed: '',
  663. columnWidth: 120,
  664. },
  665. {
  666. userId: this.$store.state.user.name,
  667. functionId: 701002,
  668. serialNumber: '701002Table2FGPartNo',
  669. tableId: '701002Table2',
  670. tableName: '申请单派工单明细表',
  671. columnProp: 'fgPartNo',
  672. headerAlign: 'center',
  673. align: 'left',
  674. columnLabel: '工单物料',
  675. columnHidden: false,
  676. columnImage: false,
  677. columnSortable: false,
  678. sortLv: 0,
  679. status: true,
  680. fixed: '',
  681. columnWidth: 80,
  682. },
  683. {
  684. userId: this.$store.state.user.name,
  685. functionId: 701002,
  686. serialNumber: '701002Table2ReleaseNo',
  687. tableId: '701002Table2',
  688. tableName: '申请单派工单明细表',
  689. columnProp: 'releaseNo',
  690. headerAlign: 'center',
  691. align: 'left',
  692. columnLabel: '发布号',
  693. columnHidden: false,
  694. columnImage: false,
  695. columnSortable: false,
  696. sortLv: 0,
  697. status: true,
  698. fixed: '',
  699. columnWidth: 80,
  700. },
  701. {
  702. userId: this.$store.state.user.name,
  703. functionId: 701002,
  704. serialNumber: '701002Table2SequenceNo',
  705. tableId: '701002Table2',
  706. tableName: '申请单派工单明细表',
  707. columnProp: 'sequenceNo',
  708. headerAlign: 'center',
  709. align: 'left',
  710. columnLabel: '序号',
  711. columnHidden: false,
  712. columnImage: false,
  713. columnSortable: false,
  714. sortLv: 0,
  715. status: true,
  716. fixed: '',
  717. columnWidth: 80,
  718. },
  719. {
  720. userId: this.$store.state.user.name,
  721. functionId: 701002,
  722. serialNumber: '701002Table2PushWmsFlag',
  723. tableId: '701002Table2',
  724. tableName: '申请单派工单明细表',
  725. columnProp: 'pushWmsFlag',
  726. headerAlign: 'center',
  727. align: 'center',
  728. columnLabel: '是否推送WCS',
  729. columnHidden: false,
  730. columnImage: false,
  731. columnSortable: false,
  732. sortLv: 0,
  733. status: true,
  734. fixed: '',
  735. columnWidth: 120,
  736. },
  737. {
  738. userId: this.$store.state.user.name,
  739. functionId: 701002,
  740. serialNumber: '701002Table2TransportFlag',
  741. tableId: '701002Table2',
  742. tableName: '申请单派工单明细表',
  743. columnProp: 'transportFlag',
  744. headerAlign: 'center',
  745. align: 'center',
  746. columnLabel: '立库取出',
  747. columnHidden: false,
  748. columnImage: false,
  749. columnSortable: false,
  750. sortLv: 0,
  751. status: true,
  752. fixed: '',
  753. columnWidth: 80,
  754. },
  755. {
  756. userId: this.$store.state.user.name,
  757. functionId: 701002,
  758. serialNumber: '701002Table2AreaDesc',
  759. tableId: '701002Table2',
  760. tableName: '申请单派工单明细表',
  761. columnProp: 'areaDesc',
  762. headerAlign: 'center',
  763. align: 'left',
  764. columnLabel: '配送区域',
  765. columnHidden: false,
  766. columnImage: false,
  767. columnSortable: false,
  768. sortLv: 0,
  769. status: true,
  770. fixed: '',
  771. columnWidth: 100,
  772. },
  773. ],
  774. columnList3: [
  775. {
  776. userId: this.$store.state.user.name,
  777. functionId: 701002,
  778. serialNumber: '701002Table3ItemNo',
  779. tableId: '701002Table3',
  780. tableName: '申请单材料明细表',
  781. columnProp: 'itemNo',
  782. headerAlign: 'center',
  783. align: 'right',
  784. columnLabel: '申请单序号',
  785. columnHidden: false,
  786. columnImage: false,
  787. columnSortable: false,
  788. sortLv: 0,
  789. status: true,
  790. fixed: '',
  791. columnWidth: 80,
  792. },
  793. {
  794. userId: this.$store.state.user.name,
  795. functionId: 701002,
  796. serialNumber: '701002Table3ComponentPartNo',
  797. tableId: '701002Table3',
  798. tableName: '申请单材料明细表',
  799. columnProp: 'componentPartNo',
  800. headerAlign: 'center',
  801. align: 'center',
  802. columnLabel: '材料编码',
  803. columnHidden: false,
  804. columnImage: false,
  805. columnSortable: false,
  806. sortLv: 0,
  807. status: true,
  808. fixed: '',
  809. columnWidth: 100,
  810. },
  811. {
  812. userId: this.$store.state.user.name,
  813. functionId: 701002,
  814. serialNumber: '701002Table3IsInWh',
  815. tableId: '701002Table3',
  816. tableName: '申请单材料明细表',
  817. columnProp: 'isInWh',
  818. headerAlign: 'center',
  819. align: 'center',
  820. columnLabel: '是否进立库',
  821. columnHidden: false,
  822. columnImage: false,
  823. columnSortable: false,
  824. sortLv: 0,
  825. status: true,
  826. fixed: '',
  827. columnWidth: 80,
  828. },
  829. {
  830. userId: this.$store.state.user.name,
  831. functionId: 701002,
  832. serialNumber: '701002Table3NeedDate',
  833. tableId: '701002Table3',
  834. tableName: '申请单材料明细表',
  835. columnProp: 'needDate',
  836. headerAlign: 'center',
  837. align: 'center',
  838. columnLabel: '需求时间',
  839. columnHidden: false,
  840. columnImage: false,
  841. columnSortable: false,
  842. sortLv: 0,
  843. status: true,
  844. fixed: '',
  845. columnWidth: 110,
  846. },
  847. {
  848. userId: this.$store.state.user.name,
  849. functionId: 701002,
  850. serialNumber: '701002Table3QtyToIssue',
  851. tableId: '701002Table3',
  852. tableName: '申请单材料明细表',
  853. columnProp: 'qtyToIssue',
  854. headerAlign: 'center',
  855. align: 'right',
  856. columnLabel: '申请数量',
  857. columnHidden: false,
  858. columnImage: false,
  859. columnSortable: false,
  860. sortLv: 0,
  861. status: true,
  862. fixed: '',
  863. columnWidth: 80,
  864. },
  865. /* {
  866. userId: this.$store.state.user.name,
  867. functionId: 701002,
  868. serialNumber: '701002Table3QtyToIssueOriginal',
  869. tableId: "701002Table3",
  870. tableName: "申请单材料明细表",
  871. columnProp: "qtyToIssueOriginal",
  872. headerAlign: "center",
  873. align: "right",
  874. columnLabel: "已发数量",
  875. columnHidden: false,
  876. columnImage: false,
  877. columnSortable: false,
  878. sortLv: 0,
  879. status: true,
  880. fixed: '',
  881. columnWidth: 80
  882. }, */ {
  883. userId: this.$store.state.user.name,
  884. functionId: 701002,
  885. serialNumber: '701002Table3IssueType',
  886. tableId: '701002Table3',
  887. tableName: '申请单材料明细表',
  888. columnProp: 'issueType',
  889. headerAlign: 'center',
  890. align: 'right',
  891. columnLabel: '类型',
  892. columnHidden: false,
  893. columnImage: false,
  894. columnSortable: false,
  895. sortLv: 0,
  896. status: true,
  897. fixed: '',
  898. columnWidth: 80,
  899. },
  900. {
  901. userId: this.$store.state.user.name,
  902. functionId: 701002,
  903. serialNumber: '701002Table3Remark',
  904. tableId: '701002Table3',
  905. tableName: '申请单材料明细表',
  906. columnProp: 'remark',
  907. headerAlign: 'center',
  908. align: 'left',
  909. columnLabel: '备注',
  910. columnHidden: false,
  911. columnImage: false,
  912. columnSortable: false,
  913. sortLv: 0,
  914. status: true,
  915. fixed: '',
  916. columnWidth: 160,
  917. },
  918. {
  919. userId: this.$store.state.user.name,
  920. functionId: 701002,
  921. serialNumber: '701002Table3SOOrderNo',
  922. tableId: '701002Table3',
  923. tableName: '申请单材料明细表',
  924. columnProp: 'soorderNo',
  925. headerAlign: 'center',
  926. align: 'left',
  927. columnLabel: '生产订单',
  928. columnHidden: false,
  929. columnImage: false,
  930. columnSortable: false,
  931. sortLv: 0,
  932. status: true,
  933. fixed: '',
  934. columnWidth: 120,
  935. },
  936. {
  937. userId: this.$store.state.user.name,
  938. functionId: 701002,
  939. serialNumber: '701002Table3BOMItemNo',
  940. tableId: '701002Table3',
  941. tableName: '申请单材料明细表',
  942. columnProp: 'bomitemNo',
  943. headerAlign: 'center',
  944. align: 'right',
  945. columnLabel: 'BOM序号',
  946. columnHidden: false,
  947. columnImage: false,
  948. columnSortable: false,
  949. sortLv: 0,
  950. status: true,
  951. fixed: '',
  952. columnWidth: 80,
  953. },
  954. ],
  955. columnList4: [
  956. {
  957. userId: this.$store.state.user.name,
  958. functionId: 701002,
  959. serialNumber: '701002Table4IssueType',
  960. tableId: '701002Table4',
  961. tableName: '申请单材料明细表',
  962. columnProp: 'issueType',
  963. headerAlign: 'center',
  964. align: 'center',
  965. columnLabel: '类型',
  966. columnHidden: false,
  967. columnImage: false,
  968. columnSortable: false,
  969. sortLv: 0,
  970. status: true,
  971. fixed: '',
  972. columnWidth: 100,
  973. },
  974. {
  975. userId: this.$store.state.user.name,
  976. functionId: 701002,
  977. serialNumber: '701002Table4ComponentPartNo',
  978. tableId: '701002Table4',
  979. tableName: '申请单材料明细表',
  980. columnProp: 'componentPartNo',
  981. headerAlign: 'center',
  982. align: 'center',
  983. columnLabel: '材料编码',
  984. columnHidden: false,
  985. columnImage: false,
  986. columnSortable: false,
  987. sortLv: 0,
  988. status: true,
  989. fixed: '',
  990. columnWidth: 100,
  991. },
  992. {
  993. userId: this.$store.state.user.name,
  994. functionId: 701002,
  995. serialNumber: '701002Table4IsInWh',
  996. tableId: '701002Table4',
  997. tableName: '申请单材料明细表',
  998. columnProp: 'isInWh',
  999. headerAlign: 'center',
  1000. align: 'center',
  1001. columnLabel: '是否进立库',
  1002. columnHidden: false,
  1003. columnImage: false,
  1004. columnSortable: false,
  1005. sortLv: 0,
  1006. status: true,
  1007. fixed: '',
  1008. columnWidth: 80,
  1009. },
  1010. {
  1011. userId: this.$store.state.user.name,
  1012. functionId: 701002,
  1013. serialNumber: '701002Table4PartDesc',
  1014. tableId: '701002Table4',
  1015. tableName: '申请单材料明细表',
  1016. columnProp: 'partDesc',
  1017. headerAlign: 'center',
  1018. align: 'left',
  1019. columnLabel: '材料名称',
  1020. columnHidden: false,
  1021. columnImage: false,
  1022. columnSortable: false,
  1023. sortLv: 0,
  1024. status: true,
  1025. fixed: '',
  1026. columnWidth: 130,
  1027. },
  1028. {
  1029. userId: this.$store.state.user.name,
  1030. functionId: 701002,
  1031. serialNumber: '701002Table4QtyToIssue',
  1032. tableId: '701002Table4',
  1033. tableName: '申请单材料明细表',
  1034. columnProp: 'qtyToIssue',
  1035. headerAlign: 'center',
  1036. align: 'right',
  1037. columnLabel: '合计申请数量',
  1038. columnHidden: false,
  1039. columnImage: false,
  1040. columnSortable: false,
  1041. sortLv: 0,
  1042. status: true,
  1043. fixed: '',
  1044. columnWidth: 80,
  1045. },
  1046. {
  1047. userId: this.$store.state.user.name,
  1048. functionId: 701002,
  1049. serialNumber: '701002Table4QtyToIssueOriginal',
  1050. tableId: '701002Table4',
  1051. tableName: '申请单材料明细表',
  1052. columnProp: 'qtyToIssueOriginal',
  1053. headerAlign: 'center',
  1054. align: 'right',
  1055. columnLabel: '合计已发数量',
  1056. columnHidden: false,
  1057. columnImage: false,
  1058. columnSortable: false,
  1059. sortLv: 0,
  1060. status: true,
  1061. fixed: '',
  1062. columnWidth: 80,
  1063. },
  1064. ],
  1065. columnList6: [
  1066. // 预留标签清单列配置 - rqrq
  1067. {
  1068. userId: this.$store.state.user.name,
  1069. functionId: 701002,
  1070. serialNumber: '701002Table6ItemNo',
  1071. tableId: '701002Table6',
  1072. tableName: '预留标签清单表',
  1073. columnProp: 'itemNo',
  1074. headerAlign: 'center',
  1075. align: 'right',
  1076. columnLabel: '订单序号',
  1077. columnHidden: false,
  1078. columnImage: false,
  1079. columnSortable: false,
  1080. sortLv: 0,
  1081. status: true,
  1082. fixed: '',
  1083. columnWidth: 80,
  1084. },
  1085. {
  1086. userId: this.$store.state.user.name,
  1087. functionId: 701002,
  1088. serialNumber: '701002Table6BOMItemNo',
  1089. tableId: '701002Table6',
  1090. tableName: '预留标签清单表',
  1091. columnProp: 'bomItemNo',
  1092. headerAlign: 'center',
  1093. align: 'right',
  1094. columnLabel: '订单物料行号',
  1095. columnHidden: false,
  1096. columnImage: false,
  1097. columnSortable: false,
  1098. sortLv: 0,
  1099. status: true,
  1100. fixed: '',
  1101. columnWidth: 100,
  1102. },
  1103. {
  1104. userId: this.$store.state.user.name,
  1105. functionId: 701002,
  1106. serialNumber: '701002Table6SerialNo',
  1107. tableId: '701002Table6',
  1108. tableName: '预留标签清单表',
  1109. columnProp: 'serialNo',
  1110. headerAlign: 'center',
  1111. align: 'left',
  1112. columnLabel: '标签号',
  1113. columnHidden: false,
  1114. columnImage: false,
  1115. columnSortable: false,
  1116. sortLv: 0,
  1117. status: true,
  1118. fixed: '',
  1119. columnWidth: 120,
  1120. },
  1121. {
  1122. userId: this.$store.state.user.name,
  1123. functionId: 701002,
  1124. serialNumber: '701002Table6TaskRef',
  1125. tableId: '701002Table6',
  1126. tableName: '预留标签清单表',
  1127. columnProp: 'taskRef',
  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: 120,
  1138. },
  1139. {
  1140. userId: this.$store.state.user.name,
  1141. functionId: 701002,
  1142. serialNumber: '701002Table6TaskItem',
  1143. tableId: '701002Table6',
  1144. tableName: '预留标签清单表',
  1145. columnProp: 'taskItem',
  1146. headerAlign: 'center',
  1147. align: 'right',
  1148. columnLabel: '立库任务行号',
  1149. columnHidden: false,
  1150. columnImage: false,
  1151. columnSortable: false,
  1152. sortLv: 0,
  1153. status: true,
  1154. fixed: '',
  1155. columnWidth: 100,
  1156. },
  1157. {
  1158. userId: this.$store.state.user.name,
  1159. functionId: 701002,
  1160. serialNumber: '701002Table6OutWcsFlag',
  1161. tableId: '701002Table6',
  1162. tableName: '预留标签清单表',
  1163. columnProp: 'outWcsFlag',
  1164. headerAlign: 'center',
  1165. align: 'center',
  1166. columnLabel: '立库取出',
  1167. columnHidden: false,
  1168. columnImage: false,
  1169. columnSortable: false,
  1170. sortLv: 0,
  1171. status: true,
  1172. fixed: '',
  1173. columnWidth: 80,
  1174. },
  1175. ],
  1176. // 导出 start
  1177. exportData: [],
  1178. exportName: '发料申请单' + this.dayjs().format('YYYYMMDDHHmmss'),
  1179. exportHeader: ['发料申请单'],
  1180. exportFooter: [],
  1181. // 导出 end
  1182. orderDetailData: {
  1183. orderNo: '',
  1184. seqNo: '',
  1185. locationNo: '',
  1186. qtyrequired: '',
  1187. issureQty: 0,
  1188. partDesc: '',
  1189. partNo: '',
  1190. resourceId: '',
  1191. resourceDesc: '',
  1192. needDate: '',
  1193. itemDesc: '',
  1194. workCenterNo: '',
  1195. itemNo: 0,
  1196. materialType: 'BOM物料',
  1197. },
  1198. chooseSOSModalFlag: false,
  1199. chooseSOSData: {
  1200. orderno: '',
  1201. seqno: '',
  1202. sResourceid: '',
  1203. startDate: '',
  1204. endDate: '',
  1205. },
  1206. chooseOrderModalFlag: false,
  1207. chooseOrderData: {
  1208. page: 1,
  1209. limit: 100,
  1210. orderNo: '',
  1211. status: '',
  1212. date3: '',
  1213. date4: '',
  1214. statusList: '',
  1215. },
  1216. chooseOrderList: [],
  1217. chooseOperationModalFlag: false,
  1218. chooseOperationData: {
  1219. orderNo: '',
  1220. site: '',
  1221. itemDesc: '',
  1222. },
  1223. chooseOperationList: [],
  1224. chooseResourceModalFlag: false,
  1225. chooseResourceData: {
  1226. site: '',
  1227. workCenterNo: '',
  1228. resourceID: '',
  1229. resourceDesc: '',
  1230. },
  1231. chooseResourceList: [],
  1232. chooseSOSList: [],
  1233. choosePartModalFlag: false,
  1234. choosePartData: {
  1235. site: '',
  1236. sourceBu: '',
  1237. partNo: '',
  1238. partDesc: '',
  1239. spec: '',
  1240. },
  1241. choosePartList: [],
  1242. // 预览相关数据
  1243. previewDialogVisible: false,
  1244. previewLoading: false,
  1245. previewData: [],
  1246. // 物料明细对话框相关数据
  1247. materialModalFlag: false,
  1248. sobomList: [],
  1249. sobomData: {
  1250. orderNo: '',
  1251. seqNo: '',
  1252. partNo: '',
  1253. },
  1254. bomLoadFlag: false,
  1255. // 编辑材料明细对话框相关数据
  1256. editMaterialModalFlag: false,
  1257. editMaterialData: {
  1258. itemNo: '',
  1259. componentPartNo: '',
  1260. isInWh: '',
  1261. needDate: '',
  1262. qtyToIssue: 0,
  1263. issueType: '',
  1264. remark: '',
  1265. soorderNo: '',
  1266. bomitemNo: '',
  1267. site: '',
  1268. notifyNo: '',
  1269. },
  1270. }
  1271. },
  1272. mounted() {
  1273. this.$nextTick(() => {
  1274. this.height = (window.innerHeight - 315) / 2
  1275. })
  1276. },
  1277. created() {
  1278. this.searchTable()
  1279. },
  1280. methods: {
  1281. // 每页数
  1282. sizeChangeHandle(val) {
  1283. this.pageSize = val
  1284. this.searchTable()
  1285. },
  1286. // 当前页
  1287. currentChangeHandle(val) {
  1288. this.pageIndex = val
  1289. this.searchTable()
  1290. },
  1291. tabClick(tab, event) {
  1292. // 刷新列表数据
  1293. this.refreshCurrentTabTable()
  1294. },
  1295. changeData(row) {
  1296. this.currentRow = JSON.parse(JSON.stringify(row))
  1297. this.refreshCurrentTabTable()
  1298. },
  1299. refreshCurrentTabTable() {
  1300. if (this.currentRow === '' || this.currentRow === null) {
  1301. this.currentRow = { site: '', notifyNo: '', orderType: 'shoporder' }
  1302. }
  1303. // rqrq - 添加orderType参数
  1304. let queryData = {
  1305. ...this.currentRow,
  1306. orderType: 'shoporder',
  1307. }
  1308. if (this.activeName === 'detail') {
  1309. searchNotifyOrderListNew(queryData).then(({ data }) => {
  1310. //区分请求成功和失败的状况
  1311. if (data && data.code == 0) {
  1312. this.dataList2 = data.rows
  1313. } else {
  1314. this.dataList2 = []
  1315. }
  1316. })
  1317. } else if (this.activeName === 'sub') {
  1318. searchNotifyMaterialListNew(queryData).then(({ data }) => {
  1319. //区分请求成功和失败的状况
  1320. if (data && data.code == 0) {
  1321. this.dataList3 = data.rows
  1322. } else {
  1323. this.dataList3 = []
  1324. }
  1325. })
  1326. } else if (this.activeName === 'change') {
  1327. searchNotifyLogNew(queryData).then(({ data }) => {
  1328. //区分请求成功和失败的状况
  1329. if (data && data.code == 0) {
  1330. this.dataList5 = data.rows
  1331. } else {
  1332. this.dataList5 = []
  1333. }
  1334. })
  1335. } else if (this.activeName === 'close') {
  1336. searchNotifyLogCloseNew(queryData).then(({ data }) => {
  1337. //区分请求成功和失败的状况
  1338. if (data && data.code == 0) {
  1339. this.dataList6 = data.rows
  1340. } else {
  1341. this.dataList6 = []
  1342. }
  1343. })
  1344. } else if (this.activeName === 'labelDetail') {
  1345. // rqrq - 预留标签清单页签
  1346. searchMaterialListDetail(queryData).then(({ data }) => {
  1347. //区分请求成功和失败的状况
  1348. if (data && data.code == 0) {
  1349. this.dataList7 = data.rows
  1350. } else {
  1351. this.dataList7 = []
  1352. }
  1353. })
  1354. } else {
  1355. searchSumNotifyMaterialListNew(queryData).then(({ data }) => {
  1356. //区分请求成功和失败的状况
  1357. if (data && data.code == 0) {
  1358. this.dataList4 = data.rows
  1359. } else {
  1360. this.dataList4 = []
  1361. }
  1362. })
  1363. }
  1364. },
  1365. searchTable() {
  1366. this.searchData.limit = this.pageSize
  1367. this.searchData.page = this.pageIndex
  1368. searchNotifyHeaderNew(this.searchData).then(({ data }) => {
  1369. //区分请求成功和失败的状况
  1370. if (data && data.code == 0) {
  1371. this.dataList = data.page.list
  1372. this.pageIndex = data.page.currPage
  1373. this.pageSize = data.page.pageSize
  1374. this.totalPage = data.page.totalCount
  1375. } else {
  1376. this.dataList = []
  1377. }
  1378. })
  1379. },
  1380. closeNotifyModel(row) {
  1381. this.closeData.site = row.site
  1382. this.closeData.notifyNo = row.notifyNo
  1383. this.closeData.closeRemark = ''
  1384. this.closeModalFlag = true
  1385. },
  1386. closeNotify() {
  1387. if (
  1388. this.closeData.closeRemark == null ||
  1389. this.closeData.closeRemark === ''
  1390. ) {
  1391. this.$alert('必须输入关闭原因', '错误', {
  1392. confirmButtonText: '确定',
  1393. })
  1394. return false
  1395. }
  1396. let inData = {
  1397. site: this.closeData.site,
  1398. notifyNo: this.closeData.notifyNo,
  1399. closeRemark: this.closeData.closeRemark,
  1400. username: this.$store.state.user.name,
  1401. status: 'CLOSED',
  1402. }
  1403. updateNotifyStatusNew(inData).then(({ data }) => {
  1404. if (data && data.code === 0) {
  1405. this.closeModalFlag = false
  1406. this.searchTable()
  1407. this.$message({
  1408. message: '操作成功',
  1409. type: 'success',
  1410. duration: 1500,
  1411. onClose: () => {},
  1412. })
  1413. } else {
  1414. this.$alert(data.msg, '错误', {
  1415. confirmButtonText: '确定',
  1416. })
  1417. }
  1418. })
  1419. },
  1420. openNotify(row) {
  1421. this.$confirm('确认打开?', '提示', {
  1422. confirmButtonText: '确定',
  1423. cancelButtonText: '取消',
  1424. type: 'warning',
  1425. }).then(() => {
  1426. let inData = {
  1427. site: row.site,
  1428. notifyNo: row.notifyNo,
  1429. status: 'ISSUE',
  1430. }
  1431. updateNotifyStatusNew(inData).then(({ data }) => {
  1432. if (data && data.code === 0) {
  1433. this.searchTable()
  1434. this.$message({
  1435. message: '操作成功',
  1436. type: 'success',
  1437. duration: 1500,
  1438. onClose: () => {},
  1439. })
  1440. } else {
  1441. this.$alert(data.msg, '错误', {
  1442. confirmButtonText: '确定',
  1443. })
  1444. }
  1445. })
  1446. })
  1447. },
  1448. // 预览库存匹配情况
  1449. previewInventory(row) {
  1450. this.currentRow = row // 保存当前行数据
  1451. this.previewDialogVisible = true
  1452. this.previewLoading = true
  1453. this.previewData = []
  1454. let inData = {
  1455. site: row.site,
  1456. notifyNo: row.notifyNo,
  1457. }
  1458. checkIssueNotifyInventory(inData)
  1459. .then(({ data }) => {
  1460. this.previewLoading = false
  1461. if (data && data.code === 0) {
  1462. this.previewData = data.rows || []
  1463. console.log('库存预览数据:', this.previewData)
  1464. } else {
  1465. this.$alert(data.msg, '错误', {
  1466. confirmButtonText: '确定',
  1467. })
  1468. }
  1469. })
  1470. .catch(() => {
  1471. this.previewLoading = false
  1472. this.$message.error('获取库存预览失败')
  1473. })
  1474. },
  1475. // 根据订单满足状态设置行样式
  1476. getRowClassName({ row }) {
  1477. if (row.orderSatisfactionStatus === 1) {
  1478. return 'success-row' // 绿色:完全立库满足
  1479. } else if (row.orderSatisfactionStatus === 2) {
  1480. return 'warning-row' // 黄色:立库+分切区满足
  1481. } else if (row.orderSatisfactionStatus === 3) {
  1482. return 'danger-row' // 红色:存在不满足
  1483. }
  1484. return ''
  1485. },
  1486. // 从预览对话框推送至WCS
  1487. pushToWCS() {
  1488. // 筛选绿色和黄色的数据(orderSatisfactionStatus = 1 或 2)
  1489. // const validData = this.previewData.filter(item =>
  1490. // item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2
  1491. // )
  1492. //全部推送 后端判断
  1493. const validData = this.previewData
  1494. if (validData.length === 0) {
  1495. this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)')
  1496. return
  1497. }
  1498. this.$confirm(`确认推送 ${validData.length} 条数据至WCS?`, '提示', {
  1499. confirmButtonText: '确定',
  1500. cancelButtonText: '取消',
  1501. type: 'warning',
  1502. })
  1503. .then(() => {
  1504. // 显示加载状态 - rqrq
  1505. this.previewLoading = true
  1506. const inData = {
  1507. site: this.currentRow.site,
  1508. notifyNo: this.currentRow.notifyNo,
  1509. inventoryList: validData,
  1510. }
  1511. pushInventoryToWcs(inData)
  1512. .then(({ data }) => {
  1513. this.previewLoading = false
  1514. if (data && data.code === 0) {
  1515. this.$message({
  1516. message: '推送WCS成功',
  1517. type: 'success',
  1518. duration: 1500,
  1519. })
  1520. this.previewDialogVisible = false
  1521. this.searchTable()
  1522. } else {
  1523. this.$alert(data.msg || '推送失败', '错误', {
  1524. confirmButtonText: '确定',
  1525. })
  1526. }
  1527. })
  1528. .catch((error) => {
  1529. this.previewLoading = false
  1530. this.$message.error(error.message || '推送WCS失败,请重试')
  1531. })
  1532. })
  1533. .catch(() => {
  1534. // 用户取消操作 - rqrq
  1535. console.log('用户取消推送')
  1536. })
  1537. },
  1538. pushToWcs(row) {
  1539. this.$confirm('确认推送到WCS?', '提示', {
  1540. confirmButtonText: '确定',
  1541. cancelButtonText: '取消',
  1542. type: 'warning',
  1543. }).then(() => {
  1544. let inData = {
  1545. site: row.site,
  1546. notifyNo: row.notifyNo,
  1547. }
  1548. pushNotifyToWcs(inData).then(({ data }) => {
  1549. if (data && data.code === 0) {
  1550. this.searchTable()
  1551. this.$message({
  1552. message: '推送WCS成功',
  1553. type: 'success',
  1554. duration: 1500,
  1555. onClose: () => {},
  1556. })
  1557. } else {
  1558. this.$alert(data.msg, '错误', {
  1559. confirmButtonText: '确定',
  1560. })
  1561. }
  1562. })
  1563. })
  1564. },
  1565. /**
  1566. * @Description 取消下达处理方法 - rqrq
  1567. * @param row 当前行数据
  1568. */
  1569. cancelIssueNotifyHandle(row) {
  1570. // 先判断发起人是否有未下达的shoporder申请单 - rqrq
  1571. let checkData = {
  1572. site: row.site,
  1573. username: row.username,
  1574. }
  1575. checkUserHasUnissueShopOrder(checkData)
  1576. .then(({ data }) => {
  1577. if (data && data.code === 0) {
  1578. // 如果有未下达的申请单 - rqrq
  1579. if (data.row != null) {
  1580. this.$alert('该用户有未下达的申请单,请先处理', '提示', {
  1581. confirmButtonText: '确定',
  1582. })
  1583. return
  1584. }
  1585. // 没有未下达的申请单,执行取消下达 - rqrq
  1586. this.$confirm(`确定取消下达申请单【${row.notifyNo}】吗?`, '提示', {
  1587. confirmButtonText: '确定',
  1588. cancelButtonText: '取消',
  1589. type: 'warning',
  1590. })
  1591. .then(() => {
  1592. let cancelData = {
  1593. site: row.site,
  1594. notifyNo: row.notifyNo,
  1595. }
  1596. cancelIssueNotify(cancelData)
  1597. .then(({ data }) => {
  1598. if (data && data.code === 0) {
  1599. this.$message.success('取消下达成功')
  1600. // 重新加载数据 - rqrq
  1601. this.searchTable()
  1602. } else {
  1603. this.$alert(data.msg, '错误', {
  1604. confirmButtonText: '确定',
  1605. })
  1606. }
  1607. })
  1608. .catch(() => {
  1609. this.$message.error('取消下达失败')
  1610. })
  1611. })
  1612. .catch(() => {
  1613. // 用户取消操作 - rqrq
  1614. })
  1615. } else {
  1616. this.$alert(data.msg, '错误', {
  1617. confirmButtonText: '确定',
  1618. })
  1619. }
  1620. })
  1621. .catch(() => {
  1622. this.$message.error('检查用户申请单失败')
  1623. })
  1624. },
  1625. deleteNotifyMaterial(row) {
  1626. this.$confirm('确认删除?', '提示', {
  1627. confirmButtonText: '确定',
  1628. cancelButtonText: '取消',
  1629. type: 'warning',
  1630. }).then(() => {
  1631. deleteNotifyMaterial(row).then(({ data }) => {
  1632. if (data && data.code === 0) {
  1633. this.refreshCurrentTabTable()
  1634. this.$message({
  1635. message: '操作成功',
  1636. type: 'success',
  1637. duration: 1500,
  1638. onClose: () => {},
  1639. })
  1640. } else {
  1641. this.$alert(data.msg, '错误', {
  1642. confirmButtonText: '确定',
  1643. })
  1644. }
  1645. })
  1646. })
  1647. },
  1648. deleteNotifySOSPlus(row) {
  1649. this.$confirm('确认删除?', '提示', {
  1650. confirmButtonText: '确定',
  1651. cancelButtonText: '取消',
  1652. type: 'warning',
  1653. }).then(() => {
  1654. deleteNotifySOSPlus(row).then(({ data }) => {
  1655. if (data && data.code === 0) {
  1656. this.refreshCurrentTabTable()
  1657. this.$message({
  1658. message: '操作成功',
  1659. type: 'success',
  1660. duration: 1500,
  1661. onClose: () => {},
  1662. })
  1663. } else {
  1664. this.$alert(data.msg, '错误', {
  1665. confirmButtonText: '确定',
  1666. })
  1667. }
  1668. })
  1669. })
  1670. },
  1671. // 进入工单物料明细
  1672. enterSOSDetail(row) {
  1673. let rows = {
  1674. site: this.currentRow.site || this.$store.state.user.site,
  1675. notifyNo: this.currentRow.notifyNo,
  1676. orderNo: row.soorderNo || row.orderNo,
  1677. seqNo: row.seqNo || '',
  1678. partNo: row.fgPartNo || row.partNo,
  1679. itemNo: row.itemNo,
  1680. releaseNo: row.releaseNo,
  1681. sequenceNo: row.sequenceNo,
  1682. }
  1683. this.enterSOS(rows)
  1684. },
  1685. // 打开物料明细对话框
  1686. enterSOS(row) {
  1687. this.materialModalFlag = true
  1688. this.sobomList = []
  1689. this.sobomData = {
  1690. orderNo: row.orderNo,
  1691. seqNo: row.seqNo,
  1692. partNo: row.partNo,
  1693. }
  1694. this.bomLoadFlag = true
  1695. let inData = {
  1696. site: this.currentRow.site || this.$store.state.user.site,
  1697. notifyNo: this.currentRow.notifyNo,
  1698. orderNo: row.orderNo,
  1699. releaseNo: row.releaseNo,
  1700. sequenceNo: row.sequenceNo,
  1701. partNo: row.partNo,
  1702. itemNo: row.itemNo,
  1703. }
  1704. getSOSBOMForIssureNew(inData)
  1705. .then(({ data }) => {
  1706. this.bomLoadFlag = false
  1707. if (data.code === 0) {
  1708. this.sobomList = data.rows
  1709. for (let i = 0; i < this.sobomList.length; i++) {
  1710. this.sobomList[i].itemNo = inData.itemNo
  1711. }
  1712. } else {
  1713. this.$alert(data.msg, '错误', {
  1714. confirmButtonText: '确定',
  1715. })
  1716. }
  1717. })
  1718. .catch(() => {
  1719. this.bomLoadFlag = false
  1720. this.$message.error('获取物料明细失败')
  1721. })
  1722. },
  1723. // 全数领料
  1724. qtyAllForBom(row) {
  1725. row.qtyToIssue = row.qtyRequired
  1726. },
  1727. // 保存物料明细
  1728. saveMaterialDetail() {
  1729. for (let i = 0; i < this.sobomList.length; i++) {
  1730. if (
  1731. this.sobomList[i].qtyToIssue === '' ||
  1732. this.sobomList[i].qtyToIssue == null
  1733. ) {
  1734. this.sobomList[i].qtyToIssue = 0
  1735. }
  1736. this.sobomList[i].notifyNo = this.currentRow.notifyNo
  1737. this.sobomList[i].site =
  1738. this.currentRow.site || this.$store.state.user.site
  1739. }
  1740. let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
  1741. if (materialList.length == 0) {
  1742. this.$alert('没有需要保存的内容!', '提示', {
  1743. confirmButtonText: '确定',
  1744. })
  1745. return false
  1746. }
  1747. saveMaterialDetail(materialList).then(({ data }) => {
  1748. if (data.code === 0) {
  1749. this.materialModalFlag = false
  1750. this.refreshCurrentTabTable()
  1751. this.$message.success('操作成功')
  1752. } else {
  1753. this.$alert(data.msg, '错误', {
  1754. confirmButtonText: '确定',
  1755. })
  1756. }
  1757. })
  1758. },
  1759. // 处理材料明细行双击事件
  1760. handleMaterialRowDblClick(row) {
  1761. if (!'未推送'.includes(this.currentRow.pushWcsFlag)) {
  1762. this.$message.warning('只有未推送状态的申请单才能编辑材料明细')
  1763. return
  1764. }
  1765. // 保存完整的行数据,以便后续保存时包含所有必要字段
  1766. this.editMaterialData = JSON.parse(JSON.stringify(row))
  1767. // 确保包含必要的字段
  1768. this.editMaterialData.site =
  1769. this.currentRow.site || this.$store.state.user.site
  1770. this.editMaterialData.notifyNo = this.currentRow.notifyNo || ''
  1771. // 确保申请数量有默认值
  1772. if (
  1773. this.editMaterialData.qtyToIssue === null ||
  1774. this.editMaterialData.qtyToIssue === undefined
  1775. ) {
  1776. this.editMaterialData.qtyToIssue = 0
  1777. }
  1778. this.editMaterialModalFlag = true
  1779. },
  1780. // 保存编辑的材料明细
  1781. saveEditMaterialDetail() {
  1782. if (
  1783. this.editMaterialData.qtyToIssue === null ||
  1784. this.editMaterialData.qtyToIssue === ''
  1785. ) {
  1786. this.$alert('申请数量不能为空!', '提示', {
  1787. confirmButtonText: '确定',
  1788. })
  1789. return false
  1790. }
  1791. if (this.editMaterialData.qtyToIssue < 0) {
  1792. this.$alert('申请数量不能小于0!', '提示', {
  1793. confirmButtonText: '确定',
  1794. })
  1795. return false
  1796. }
  1797. // 使用完整的行数据,只更新申请数量
  1798. let materialData = {
  1799. ...this.editMaterialData,
  1800. }
  1801. // 确保申请数量不为空
  1802. if (materialData.qtyToIssue === '' || materialData.qtyToIssue == null) {
  1803. materialData.qtyToIssue = 0
  1804. }
  1805. updateMaterialDetail(materialData)
  1806. .then(({ data }) => {
  1807. if (data.code === 0) {
  1808. this.editMaterialModalFlag = false
  1809. this.refreshCurrentTabTable()
  1810. this.$message.success('保存成功')
  1811. } else {
  1812. this.$alert(data.msg, '错误', {
  1813. confirmButtonText: '确定',
  1814. })
  1815. }
  1816. })
  1817. .catch(() => {
  1818. this.$message.error('保存失败')
  1819. })
  1820. },
  1821. //导出excel - rqrq
  1822. async createExportData() {
  1823. const queryParams = {
  1824. ...this.searchData,
  1825. limit: 999999, // 设置一个很大的数字来获取全部数据 - rqrq
  1826. page: 1,
  1827. }
  1828. const { data } = await searchNotifyHeaderNew(queryParams)
  1829. if (data && data.code === 0) {
  1830. return data.page.list || []
  1831. }
  1832. return []
  1833. },
  1834. startDownload() {
  1835. // this.exportData = this.dataList
  1836. },
  1837. finishDownload() {},
  1838. fields() {
  1839. let json = '{'
  1840. this.columnList1.forEach((item, index) => {
  1841. if (index == this.columnList1.length - 1) {
  1842. json +=
  1843. '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  1844. } else {
  1845. json +=
  1846. '"' +
  1847. item.columnLabel +
  1848. '"' +
  1849. ':' +
  1850. '"' +
  1851. item.columnProp +
  1852. '"' +
  1853. ','
  1854. }
  1855. })
  1856. json += '}'
  1857. let s = eval('(' + json + ')')
  1858. return s
  1859. },
  1860. tableRowClassName({ row, rowIndex }) {
  1861. if (
  1862. row.qtyToIssueOriginal < row.qtyToIssue &&
  1863. new Date(row.needDate) <
  1864. new Date(this.dayjs().format('YYYY-MM-DD HH:mm'))
  1865. ) {
  1866. return 'error-row'
  1867. }
  1868. return ''
  1869. },
  1870. },
  1871. }
  1872. </script>
  1873. <style scoped>
  1874. /deep/ .el-form-item--medium .el-form-item__content {
  1875. height: auto;
  1876. }
  1877. .disabled {
  1878. cursor: not-allowed !important;
  1879. color: #c0c4cc !important;
  1880. pointer-events: none;
  1881. }
  1882. .text-right >>> .el-input__inner {
  1883. text-align: right !important;
  1884. }
  1885. .text-right >>> .el-input-number__input {
  1886. text-align: right !important;
  1887. }
  1888. .yzzTable /deep/.el-table .cell {
  1889. line-height: 20px;
  1890. font-size: 12px;
  1891. height: 20px;
  1892. }
  1893. .single-line-multi-select >>> .el-select__tags {
  1894. display: flex;
  1895. flex-wrap: nowrap;
  1896. overflow: hidden;
  1897. white-space: nowrap;
  1898. max-width: 100%;
  1899. }
  1900. .single-line-multi-select >>> .el-tag {
  1901. flex-shrink: 0;
  1902. max-width: 100px;
  1903. overflow: hidden;
  1904. text-overflow: ellipsis;
  1905. white-space: nowrap;
  1906. }
  1907. .single-line-multi-select >>> .el-select__input {
  1908. flex-shrink: 0;
  1909. min-width: 30px;
  1910. }
  1911. /* 库存预览表格行颜色 */
  1912. /deep/ .el-table .success-row {
  1913. background: #f0f9ff !important;
  1914. border-left: 3px solid #67c23a;
  1915. }
  1916. /* rqrq - 匹配条码列自动换行显示 */
  1917. /deep/ .wrap-text-column .cell {
  1918. white-space: normal !important;
  1919. word-break: break-all !important;
  1920. line-height: 1.5 !important;
  1921. }
  1922. /deep/ .el-table .warning-row {
  1923. background: #fdf6ec !important;
  1924. border-left: 3px solid #e6a23c;
  1925. }
  1926. /deep/ .el-table .danger-row {
  1927. background: #fef0f0 !important;
  1928. border-left: 3px solid #f56c6c;
  1929. }
  1930. /deep/ .el-table .success-row:hover > td {
  1931. background-color: #ecf5ff !important;
  1932. }
  1933. /deep/ .el-table .warning-row:hover > td {
  1934. background-color: #faecd8 !important;
  1935. }
  1936. /deep/ .el-table .danger-row:hover > td {
  1937. background-color: #fde2e2 !important;
  1938. }
  1939. </style>