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.

2862 lines
96 KiB

3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
2 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
2 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item :label="'单据号'">
  6. <el-input v-model="searchData.notifyNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'单据状态'">
  9. <el-select multiple collapse-tags v-model="searchData.orderStatusList" clearable style="width: 160px">
  10. <el-option label="ISSUE" value="ISSUE"></el-option>
  11. <el-option label="CLOSED" value="CLOSED"></el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="推送WCS">
  15. <el-select v-model="searchData.pushWcsFlag" placeholder="请选择" clearable style="width: 120px">
  16. <el-option label="全部" value=""></el-option>
  17. <el-option label="未推送" value="未推送"></el-option>
  18. <el-option label="部分推送" value="部分推送"></el-option>
  19. <el-option label="推送完成" value="推送完成"></el-option>
  20. <el-option label="出库完成" value="出库完成"></el-option>
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item :label="'申请单日期'">
  24. <el-date-picker style="width: 120px" v-model="searchData.startDate" type="date" value-format="yyyy-MM-dd"
  25. placeholder="选择日期">
  26. </el-date-picker>
  27. </el-form-item>
  28. <el-form-item style="margin-top: 23px;">
  29. <!-- <laber style="margin-left: -9px;font-size: 19px"></laber> -->
  30. ~
  31. </el-form-item>
  32. <el-form-item :label="' '">
  33. <el-date-picker style="width: 120px" v-model="searchData.endDate" type="date" value-format="yyyy-MM-dd"
  34. placeholder="选择日期">
  35. </el-date-picker>
  36. </el-form-item>
  37. <el-form-item :label="' '">
  38. <el-button type="primary" :loading="searchLoading" @click="getDataList()">查询</el-button>
  39. </el-form-item>
  40. </el-form>
  41. <!-- 展示列表 -->
  42. <el-table :height="height" :data="dataList" border v-loading="searchLoading" ref="inboundTable"
  43. :row-style="rowStyle" @row-click="inboundClickRow" @current-change="changeCurrentRow"
  44. style="width: 100%;">
  45. <el-table-column type="selection" header-align="center" align="center" width="50">
  46. </el-table-column>
  47. <el-table-column v-for="(item,index) in columnList" :key="index" :sortable="item.columnSortable"
  48. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  49. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  50. :label="item.columnLabel">
  51. <template slot-scope="scope">
  52. <span v-if="!item.columnHidden">
  53. <span v-if="item.columnProp === 'transportFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
  54. {{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
  55. </span>
  56. <span v-else>{{ scope.row[item.columnProp] }}</span>
  57. </span>
  58. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  59. style="width: 100px; height: 80px" /></span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column fixed="right" header-align="center" align="center" width="250" label="操作">
  63. <template slot-scope="scope">
  64. <!-- <template v-if="!authUpdate">
  65. <el-link
  66. v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '待检验' || scope.row.orderStatus === '编辑中'"
  67. style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
  68. </template> -->
  69. <template v-if="!authClose">
  70. <el-link style="cursor: pointer"
  71. @click="closeModal(scope.row)">关闭</el-link>
  72. </template>
  73. <!-- rqrq - 推送WCS按钮只在状态为ISSUE且未推送完成时显示 -->
  74. <el-link v-if="scope.row.pushWcsFlag!=='出库完成'&&scope.row.status==='ISSUE' && scope.row.pushWcsFlag!=='推送完成'"
  75. style="cursor: pointer; margin-left: 10px;"
  76. @click="previewInventory(scope.row)">推送WCS</el-link>
  77. <!-- rqrq - 取消下达按钮只在状态为ISSUE且未推送WCS时显示 -->
  78. <el-link v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'"
  79. style="cursor: pointer; margin-left: 10px;"
  80. @click="cancelIssueShipmentHandle(scope.row)">取消下达</el-link>
  81. <!-- <template v-if="!authIssue">
  82. <el-link v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '编辑中'" style="cursor: pointer"
  83. @click="issueModal(scope.row)">下达</el-link>
  84. </template> -->
  85. </template>
  86. </el-table-column>
  87. </el-table>
  88. <!-- 分页栏 -->
  89. <el-pagination style="margin-top: 0px" @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
  90. :current-page="pageIndex" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize" :total="totalPage"
  91. layout="total, sizes, prev, pager, next, jumper">
  92. </el-pagination>
  93. <!-- 收货入库通知新增/修改 -->
  94. <el-dialog title="收货入库通知" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="525px">
  95. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"
  96. style="margin-left: 7px;margin-top: -5px;">
  97. <el-form-item label="单据类型" prop="orderType">
  98. <el-select v-model="modalData.orderType" :disabled="modalDisableFlag" style="width: 100px">
  99. <el-option label="生产退料" value="生产退料"></el-option>
  100. <el-option label="生产入库" value="生产入库"></el-option>
  101. <el-option label="其他入库" value="其他入库"></el-option>
  102. </el-select>
  103. </el-form-item>
  104. <el-form-item label="要求入库日期" prop="requiredInboundDate">
  105. <el-date-picker style="width: 120px" v-model="modalData.requiredInboundDate" type="date"
  106. value-format="yyyy-MM-dd">
  107. </el-date-picker>
  108. </el-form-item>
  109. </el-form>
  110. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  111. <el-form-item>
  112. <!-- <span v-if="modalDisableFlag" slot="label">供应商</span>-->
  113. <span style="cursor: pointer" slot="label" @click="getBaseList(506)"><a href="#">供应商</a></span>
  114. <el-input v-model="modalData.supplierId" @change="supplierBlur(506)" style="width: 100px"></el-input>
  115. <el-input v-model="modalData.supplierName" disabled style="width: 380px"></el-input>
  116. </el-form-item>
  117. </el-form>
  118. <el-form :inline="true" label-position="top" style="margin-left: 7px">
  119. <el-form-item :label="'备注'">
  120. <el-input type="textarea" v-model="modalData.remarks" :rows="3" resize='none' show-word-limit
  121. style="width: 485px;height: 20px"></el-input>
  122. </el-form-item>
  123. </el-form>
  124. <el-footer style="height:35px;margin-top: 55px;text-align:center">
  125. <el-button type="primary" :loading="saveLoading" @click="saveData()">保存</el-button>
  126. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  127. </el-footer>
  128. </el-dialog>
  129. <!-- 页签 -->
  130. <el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card"
  131. @tab-click="tabClick" class="customer-tab">
  132. <el-tab-pane label="已申请SHIPMENT" name="inboundDetail">
  133. <!-- <el-form label-position="top" style="margin-left: 2px;">
  134. <el-button type="primary" @click="deleteInboundDetail()" icon="el-icon-delete">删除</el-button>
  135. </el-form> -->
  136. <el-table :data="detailList" :height="secondHeight - 68" border @selection-change="selectionInboundDetail"
  137. v-loading="searchLoading" style="width: 100%;">
  138. <!-- <el-table-column type="selection" header-align="center" align="center" width="50">
  139. </el-table-column> -->
  140. <el-table-column v-for="(item,index) in columnDetailList" :key="index" :sortable="item.columnSortable"
  141. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  142. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  143. :label="item.columnLabel">
  144. <template slot-scope="scope">
  145. <span v-if="!item.columnHidden">
  146. <span v-if="item.columnProp === 'pushWmsFlag' || item.columnProp === 'transportFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
  147. {{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
  148. </span>
  149. <span v-else>{{scope.row[item.columnProp]}}</span>
  150. </span>
  151. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  152. style="width: 100px; height: 80px" /></span>
  153. </template>
  154. </el-table-column>
  155. <!-- <el-table-column prop="requiredQty" header-align="center" align="right" min-width="100" label="要求入库数量">
  156. <template slot-scope="scope">
  157. <span v-if="editBatchVisible">
  158. <el-input :controls="false" v-model="scope.row.requiredQty"
  159. @input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
  160. style="height: 11px; width: 98%;">
  161. </el-input>
  162. </span>
  163. <span v-else>
  164. <span>{{scope.row[scope.column.property]}}</span>
  165. </span>
  166. </template>
  167. </el-table-column>
  168. <el-table-column prop="inWarehouseName" header-align="center" align="center" min-width="180" label="入库仓库">
  169. <template slot-scope="scope">
  170. <span v-if="editBatchVisible">
  171. <el-button type="text" @click="chooseWareHouse(scope.row)"
  172. style="width:18%;padding: 3px 7px">选择</el-button>
  173. <el-input v-model="scope.row.inWarehouseName" readonly style="width:77%"></el-input>
  174. </span>
  175. <span v-else>
  176. <span>{{scope.row[scope.column.property]}}</span>
  177. </span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column prop="actualStockInQty" header-align="center" align="right" min-width="100" label="实际入库数量">
  181. </el-table-column> -->
  182. <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
  183. <template slot-scope="scope">
  184. <a type="text" size="small" @click="enterSOSDetail(scope.row)">修改</a>
  185. <!-- 不需要删除这里如果删掉了没地方添加只允许关闭申请单重新下 -->
  186. <!-- <a type="text" size="small" @click="deleteNotifySOS(scope.row)" style="margin-left: 10px;">删除</a> -->
  187. </template>
  188. </el-table-column>
  189. </el-table>
  190. </el-tab-pane>
  191. <el-tab-pane label="预留标签清单" name="labelDetail">
  192. <el-table
  193. :data="dataList7"
  194. :height="secondHeight - 68"
  195. border
  196. v-loading="searchLoading"
  197. style="width: 100%;">
  198. <el-table-column
  199. v-for="(item,index) in columnList6" :key="index"
  200. :sortable="item.columnSortable"
  201. :prop="item.columnProp"
  202. :header-align="item.headerAlign"
  203. :show-overflow-tooltip="item.showOverflowTooltip"
  204. :align="item.align"
  205. :fixed="item.fixed==''?false:item.fixed"
  206. :min-width="item.columnWidth"
  207. :label="item.columnLabel">
  208. <template slot-scope="scope">
  209. <span v-if="!item.columnHidden">
  210. <span v-if="item.columnProp === 'outWcsFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
  211. {{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
  212. </span>
  213. <span v-else>{{ scope.row[item.columnProp] }}</span>
  214. </span>
  215. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  216. </template>
  217. </el-table-column>
  218. </el-table>
  219. </el-tab-pane>
  220. </el-tabs>
  221. <!-- 收获入库单明细新增 -->
  222. <el-dialog title="收货入库单明细" :close-on-click-modal="false" v-drag :visible.sync="detailModal" width="900px">
  223. <div style="font-size: 12px">
  224. <el-form :inline="true" label-position="top" :model="detailSearchData">
  225. <el-form-item :label="'物料编码'">
  226. <el-input v-model="detailSearchData.partNo" clearable style="width: 120px"></el-input>
  227. </el-form-item>
  228. <el-form-item :label="'物料名称'">
  229. <el-input v-model="detailSearchData.partDesc" clearable style="width: 120px"></el-input>
  230. </el-form-item>
  231. <template v-if="detailSearchData.orderType === '生产入库'">
  232. <el-form-item :label="'生产订单'">
  233. <el-input v-model="detailSearchData.relatedOrderNo" clearable style="width: 120px"></el-input>
  234. </el-form-item>
  235. <el-form-item :label="'订单状态'">
  236. <el-select v-model="detailSearchData.status" clearable style="width: 100px">
  237. <el-option label="已计划" value="已计划"></el-option>
  238. <el-option label="已下达" value="已下达"></el-option>
  239. <el-option label="已排产" value="已排产"></el-option>
  240. <el-option label="已开工" value="已开工"></el-option>
  241. <el-option label="已取消" value="已取消"></el-option>
  242. <el-option label="已停工" value="已停工"></el-option>
  243. <el-option label="已关闭" value="已关闭"></el-option>
  244. </el-select>
  245. </el-form-item>
  246. </template>
  247. <el-form-item label=" ">
  248. <el-button type="primary" @click="searchTypeChange">查询</el-button>
  249. </el-form-item>
  250. </el-form>
  251. </div>
  252. <el-container v-if="detailSearchData.orderType === '其他入库'">
  253. <el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
  254. <span style="font-size: 12px">可选物料</span>
  255. <el-table height="200px" :data="partList1" border ref="partTable1" @selection-change="selectionPart1"
  256. highlight-current-row style="width: 100%">
  257. <el-table-column type="selection" header-align="center" align="center" width="50">
  258. </el-table-column>
  259. <el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
  260. </el-table-column>
  261. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" label="物料名称">
  262. </el-table-column>
  263. <el-table-column prop="unit" header-align="center" align="left" min-width="120" label="物料单位">
  264. </el-table-column>
  265. </el-table>
  266. <!-- 分页-->
  267. <el-pagination style="margin-top: 5px" @size-change="sizeChangeHandle2" @current-change="currentChangeHandle2"
  268. :current-page="pageIndex2" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize2" :total="totalPage2"
  269. layout="total, sizes, prev, pager, next, jumper">
  270. </el-pagination>
  271. </el-header>
  272. <el-main style="width: 880px;height: 27px;margin-top: 70px;padding: 0 0 0 0;text-align:center">
  273. <div>
  274. <el-button type="primary" @click="addPart">添加>></el-button>
  275. <el-button type="primary" @click="deletePart">删除&lt;&lt;</el-button>
  276. </div>
  277. </el-main>
  278. <el-footer style="width: 880px;height: 200px;padding: 0 0 0 0;">
  279. <span style="font-size: 12px">已选物料</span>
  280. <div class="rq">
  281. <el-table height="200px" :data="partList2" border ref="partTable2" @selection-change="selectionPart2"
  282. highlight-current-row style="width: 100%">
  283. <el-table-column type="selection" header-align="center" align="center" width="50">
  284. </el-table-column>
  285. <el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
  286. </el-table-column>
  287. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" label="物料名称">
  288. </el-table-column>
  289. <el-table-column prop="" header-align="center" align="center" min-width="100" label="要求入库数量">
  290. <template slot-scope="scope">
  291. <el-input :controls="false" v-model="scope.row.requiredQty"
  292. @input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
  293. style="height: 11px; width: 98%;">
  294. </el-input>
  295. </template>
  296. </el-table-column>
  297. </el-table>
  298. </div>
  299. </el-footer>
  300. </el-container>
  301. <el-container v-else-if="detailSearchData.orderType === '生产入库'">
  302. <el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
  303. <span style="font-size: 12px">可选物料</span>
  304. <el-table height="200px" :data="partList1" border ref="partTable1" @selection-change="selectionPart1"
  305. highlight-current-row style="width: 100%">
  306. <el-table-column type="selection" header-align="center" align="center" width="50">
  307. </el-table-column>
  308. <el-table-column prop="relatedOrderNo" header-align="center" align="left" min-width="100" label="生产订单">
  309. </el-table-column>
  310. <el-table-column prop="partNo" header-align="center" align="left" min-width="100" label="物料编码">
  311. </el-table-column>
  312. <el-table-column prop="partDesc" header-align="center" align="left" min-width="200" label="物料名称">
  313. </el-table-column>
  314. <el-table-column prop="unit" header-align="center" align="left" min-width="80" label="物料单位">
  315. </el-table-column>
  316. <el-table-column prop="orderQty" header-align="center" align="right" min-width="80" label="订单数量">
  317. </el-table-column>
  318. <el-table-column prop="requiredQty" header-align="center" align="right" min-width="80" label="可入库数">
  319. </el-table-column>
  320. <el-table-column prop="countRollNo" header-align="center" align="right" min-width="80" label="可入库卷数">
  321. </el-table-column>
  322. </el-table>
  323. <!-- 分页-->
  324. <el-pagination style="margin-top: 5px" @size-change="sizeChangeHandle2" @current-change="currentChangeHandle2"
  325. :current-page="pageIndex2" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize2" :total="totalPage2"
  326. layout="total, sizes, prev, pager, next, jumper">
  327. </el-pagination>
  328. </el-header>
  329. <el-main style="width: 880px;height: 27px;margin-top: 70px;padding: 0 0 0 0;text-align:center">
  330. <div>
  331. <el-button type="primary" @click="addPart">添加>></el-button>
  332. <el-button type="primary" @click="deletePart">删除&lt;&lt;</el-button>
  333. </div>
  334. </el-main>
  335. <el-footer style="width: 880px;height: 200px;padding: 0 0 0 0;">
  336. <span style="font-size: 12px">已选物料</span>
  337. <div class="rq">
  338. <el-table height="200px" :data="partList2" border ref="partTable2" @selection-change="selectionPart2"
  339. highlight-current-row style="width: 100%">
  340. <el-table-column type="selection" header-align="center" align="center" width="50">
  341. </el-table-column>
  342. <el-table-column prop="relatedOrderNo" header-align="center" align="center" min-width="80" label="生产订单">
  343. </el-table-column>
  344. <el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
  345. </el-table-column>
  346. <el-table-column prop="partDesc" header-align="center" align="left" min-width="150" label="物料名称">
  347. </el-table-column>
  348. <el-table-column prop="" header-align="center" align="center" min-width="100" label="要求入库数量">
  349. <template slot-scope="scope">
  350. <el-input :controls="false" v-model="scope.row.requiredQty"
  351. @input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
  352. style="height: 11px; width: 98%;">
  353. </el-input>
  354. </template>
  355. </el-table-column>
  356. </el-table>
  357. </div>
  358. </el-footer>
  359. </el-container>
  360. <el-footer style="height:30px;margin-top: 35px;text-align:center">
  361. <el-button type="primary" :loading="saveLoading" @click="saveInboundDetail">保存</el-button>
  362. <el-button type="primary" @click="detailModal = false">关闭</el-button>
  363. </el-footer>
  364. </el-dialog>
  365. <el-dialog title="选择工单" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1000px">
  366. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  367. <el-row :gutter="20">
  368. <el-col :span="4">
  369. <el-form-item :label="'生产订单'">
  370. <el-input v-model="seqNoData.orderno"></el-input>
  371. </el-form-item>
  372. </el-col>
  373. <el-col :span="4">
  374. <el-form-item>
  375. <span slot="label" style="" @click="getBaseList(515)"><a herf="#">机台</a></span>
  376. <el-input v-model="seqNoData.sResourceid"></el-input>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="4">
  380. <el-form-item>
  381. <span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span>
  382. <el-input v-model="seqNoData.sWorkcenterno"></el-input>
  383. </el-form-item>
  384. </el-col>
  385. <el-col :span="4">
  386. <el-form-item :label="'派工日期'">
  387. <el-date-picker style="width: 100%" v-model="seqNoData.startDate" type="date" value-format="yyyy-MM-dd"
  388. placeholder="选择日期">
  389. </el-date-picker>
  390. </el-form-item>
  391. </el-col>
  392. <el-col :span="4">
  393. <el-form-item :label="'到'">
  394. <el-date-picker style="width: 100%" v-model="seqNoData.endDate" type="date" value-format="yyyy-MM-dd"
  395. placeholder="选择日期">
  396. </el-date-picker>
  397. </el-form-item>
  398. </el-col>
  399. </el-row>
  400. <el-row :gutter="20">
  401. <el-col :span="6">
  402. <el-form-item>
  403. <el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="">查询</el-button>
  404. </el-form-item>
  405. </el-col>
  406. </el-row>
  407. </el-form>
  408. <el-table :height="400" :data="seqNoList" border style="width: 100%;">
  409. <el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
  410. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  411. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  412. :label="item.columnLabel">
  413. <template slot-scope="scope">
  414. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  415. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  416. style="width: 100px; height: 80px" /></span>
  417. </template>
  418. </el-table-column>
  419. <el-table-column fixed="left" header-align="center" align="center" width="60" label="操作">
  420. <template slot-scope="scope">
  421. <a type="text" size="small" @click="chooseSOS(scope.row)">选择</a>
  422. </template>
  423. </el-table-column>
  424. </el-table>
  425. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  426. <el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button>
  427. </el-footer>
  428. </el-dialog>
  429. <el-dialog title="保存工单" :close-on-click-modal="false" v-drag :visible.sync="saveSeqNoModalFlag" width="750px">
  430. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  431. <el-row :gutter="20">
  432. <el-col :span="6">
  433. <el-form-item :label="'生产订单'">
  434. <el-input v-model="notifyOrderData.orderNo" disabled></el-input>
  435. </el-form-item>
  436. </el-col>
  437. <el-col :span="6">
  438. <el-form-item :label="'机台'">
  439. <el-input v-model="notifyOrderData.sResourceID" disabled></el-input>
  440. </el-form-item>
  441. </el-col>
  442. <el-col :span="6">
  443. <el-form-item :label="'工单数量'">
  444. <el-input v-model="notifyOrderData.qtyRequired" disabled></el-input>
  445. </el-form-item>
  446. </el-col>
  447. </el-row>
  448. <el-row :gutter="20">
  449. <el-col :span="6">
  450. <el-form-item :label="'物料'">
  451. <el-input v-model="notifyOrderData.partNo" disabled></el-input>
  452. </el-form-item>
  453. </el-col>
  454. <el-col :span="12">
  455. <el-form-item :label="'物料名称'">
  456. <el-input v-model="notifyOrderData.partDesc" disabled style="width: 204%" ></el-input>
  457. </el-form-item>
  458. </el-col>
  459. </el-row>
  460. <el-row :gutter="20">
  461. <el-col :span="6">
  462. <el-form-item :label="'要求发料时间'">
  463. <el-date-picker style="width: 100%" v-model="notifyOrderData.needDate" type="datetime"
  464. value-format="yyyy-MM-dd HH:mm" placeholder="选择日期">
  465. </el-date-picker>
  466. </el-form-item>
  467. </el-col>
  468. <el-col :span="6">
  469. <el-form-item label="机台">
  470. <el-input v-model="notifyOrderData.locationNo" disabled></el-input>
  471. </el-form-item>
  472. </el-col>
  473. <el-col :span="6">
  474. <el-form-item :label="'此次领料数量'">
  475. <el-input-number v-model="notifyOrderData.issureQty" style="padding: 0px;width: 100%" :controls="false"
  476. :step="0" :min="0" class="text-right"></el-input-number>
  477. </el-form-item>
  478. </el-col>
  479. <el-col :span="6">
  480. <el-form-item :label="' '">
  481. <el-button type="primary" @click="qtyAllForSeqNo()" style="margin-top: 4%;">全数领料</el-button>
  482. </el-form-item>
  483. </el-col>
  484. </el-row>
  485. </el-form>
  486. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  487. <el-button type="primary" @click="saveSOS()">保存</el-button>
  488. <el-button type="primary" @click="saveSeqNoModalFlag=false">关闭</el-button>
  489. </el-footer>
  490. </el-dialog>
  491. <!-- 入库明细 -->
  492. <el-dialog title="入库明细" :close-on-click-modal="false" v-drag :visible.sync="detailModal2" width="900px">
  493. <el-table height="400px" :data="detailList2" border style="width: 100%;">
  494. <el-table-column v-for="(item,index) in columnDetailList2" :key="index" :sortable="item.columnSortable"
  495. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  496. :align="item.align" :fixed="item.fixed===''?false:item.fixed" :min-width="item.columnWidth"
  497. :label="item.columnLabel">
  498. </el-table-column>
  499. </el-table>
  500. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  501. <el-button type="primary" @click="detailModal2 = false">关闭</el-button>
  502. </el-footer>
  503. </el-dialog>
  504. <el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="900px">
  505. <!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  506. <el-row :gutter="20">
  507. <el-col :span="6">
  508. <el-form-item :label="'生产订单号'">
  509. <el-input v-model="sobomData.orderNo" disabled></el-input>
  510. </el-form-item>
  511. </el-col>
  512. <el-col :span="6">
  513. <el-form-item :label="'产品编码'">
  514. <el-input v-model="sobomData.partNo" disabled></el-input>
  515. </el-form-item>
  516. </el-col>
  517. </el-row>
  518. </el-form> -->
  519. <div class="yzzTable">
  520. <el-table :height="400" :data="sobomList" border style="width: 100%;" v-loading="bomLoadFlag">
  521. <el-table-column v-for="(item,index) in columnList3" :key="index" :sortable="item.columnSortable"
  522. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  523. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  524. :label="item.columnLabel">
  525. <template slot-scope="scope">
  526. <div v-if="item.columnProp === 'qtyToIssue'">
  527. <el-input v-model="scope.row.qtyToIssue" style="height: 11px; width: 98%;" :step="0" :min="0"></el-input>
  528. </div>
  529. <div v-else-if="item.columnProp === 'remark'">
  530. <el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
  531. </div>
  532. <div v-else>
  533. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  534. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  535. style="width: 100px; height: 80px" /></span>
  536. </div>
  537. </template>
  538. </el-table-column>
  539. </el-table>
  540. </div>
  541. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  542. <el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
  543. <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
  544. </el-footer>
  545. </el-dialog>
  546. <!-- rqrq - 库存预览弹窗发货通知单只有绿色和红色 -->
  547. <el-dialog
  548. title="库存预览"
  549. :close-on-click-modal="false"
  550. v-drag
  551. :visible.sync="previewDialogVisible"
  552. width="90%">
  553. <div v-loading="previewLoading">
  554. <el-table
  555. :data="previewData"
  556. height="400"
  557. border
  558. :row-style="getRowStyle"
  559. highlight-current-row
  560. style="width: 100%">
  561. <el-table-column prop="partNo" label="物料编号" sortable min-width="80"></el-table-column>
  562. <el-table-column prop="requiredQty" label="需求数量" min-width="80" align="right"></el-table-column>
  563. <el-table-column prop="productionOrderNo" label="发货单" sortable min-width="100"></el-table-column>
  564. <el-table-column prop="bomLineNo" label="行号" min-width="60"></el-table-column>
  565. <el-table-column label="是否满足" sortable min-width="80" align="center">
  566. <template slot-scope="scope">
  567. <span :style="{color: scope.row.isWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
  568. {{ scope.row.isWarehouseSatisfied === 'Y' ? '满足' : '不满足' }}
  569. </span>
  570. </template>
  571. </el-table-column>
  572. <el-table-column prop="matchedBarcodes" label="匹配条码" min-width="500" align="left" class-name="wrap-text-column">
  573. <template slot-scope="scope">
  574. <div style="white-space: normal; word-break: break-all; line-height: 1.5;">
  575. {{ scope.row.matchedBarcodes }}
  576. </div>
  577. </template>
  578. </el-table-column>
  579. </el-table>
  580. </div>
  581. <div slot="footer" class="dialog-footer">
  582. <el-button type="primary" @click="pushToWcs" :disabled="pushLoading">
  583. {{ pushLoading ? '推送中...' : '推送至WCS' }}
  584. </el-button>
  585. <el-button @click="previewDialogVisible = false" :disabled="pushLoading">关闭</el-button>
  586. </div>
  587. </el-dialog>
  588. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  589. </div>
  590. </template>
  591. <script>
  592. import {
  593. getSiteAndBuByUserName,
  594. searchNotifyHeader,
  595. createNotify,
  596. getNotifyNoDetail,
  597. searchNotifyMaterialList,
  598. closeInboundNotification,
  599. checkUserHasUnissueShipment,
  600. cancelIssueShipment,
  601. checkShipmentInventory,
  602. pushShipmentInventoryToWcs,
  603. deleteNotifyUnissue,
  604. saveShipmentMaterialDetail,
  605. searchUnissueNotifyMaterialList
  606. } from '@/api/shipment/shipmentIssue.js'
  607. // rqrq - 导入预留标签清单API
  608. import { searchMaterialListDetail } from '@/api/orderIssure/soIssueNotify.js'
  609. import Chooselist from '@/views/modules/common/Chooselist_eam'
  610. import { getChooselist } from '@/api/chooselist/chooselist.js'
  611. import {
  612. getTableDefaultListLanguage,
  613. getTableUserListLanguage,
  614. } from '@/api/table.js'
  615. export default {
  616. components: {
  617. Chooselist,
  618. },
  619. data() {
  620. return {
  621. columnsProp: ['createBy', 'updateBy'],
  622. // 导出 start
  623. exportData: [],
  624. exportName: '收货入库' + this.dayjs().format('YYYYMMDDHHmmss'),
  625. exportHeader: ['收货入库'],
  626. exportFooter: [],
  627. exportList: [],
  628. // 导出 end
  629. tagNo: '',
  630. tagType: '',
  631. searchData: {
  632. site: '',
  633. userName: this.$store.state.user.name,
  634. orderNo: '',
  635. orderType: '',
  636. orderStatus: '',
  637. orderStatusList: [],
  638. pushWcsFlag: '', // rqrq - 新增推送WCS筛选条件
  639. startDate: '',
  640. endDate: '',
  641. page: 1,
  642. limit: 10,
  643. },
  644. detailSearchData: {
  645. site: '',
  646. buNo: '',
  647. orderNo: '',
  648. partNo: '',
  649. partDesc: '',
  650. partNos: '',
  651. orderType: '',
  652. relatedOrderNo: '',
  653. status: '',
  654. page: 1,
  655. limit: 10,
  656. },
  657. height: 200,
  658. secondHeight: 200,
  659. pageIndex: 1,
  660. pageSize: 20,
  661. totalPage: 0,
  662. pageIndex2: 1,
  663. pageSize2: 20,
  664. totalPage2: 0,
  665. modalFlag: false,
  666. modalDisableFlag: false,
  667. notifyOrderData: {
  668. partNo: '',
  669. orderno: '',
  670. itemno: '',
  671. seqno: '',
  672. partDesc: '',
  673. qtyrequired: '',
  674. sResourceid: '',
  675. issureQty: '',
  676. locationNo: '',
  677. needDate: '',
  678. },
  679. modalData: {
  680. site: '',
  681. bu: '',
  682. buNo: '',
  683. flag: '',
  684. orderNo: '',
  685. orderType: '',
  686. orderStatus: '',
  687. requiredInboundDate: '',
  688. supplierId: '',
  689. supplierName: '',
  690. remarks: '',
  691. createdBy: '',
  692. updatedBy: '',
  693. },
  694. seqNoData: {
  695. site: localStorage.getItem('site'),
  696. bu: '',
  697. orderno: '',
  698. seqno: '',
  699. sResourceid: '',
  700. sWorkcenterno: '',
  701. operatorId: '',
  702. sShiftno: '',
  703. startDate: '',
  704. endDate: '',
  705. },
  706. dataList: [],
  707. detailList: [],
  708. userBuList: [],
  709. inboundSelection: [],
  710. inboundDetailSelection: [],
  711. partSelections1: [],
  712. partSelections2: [],
  713. partList1: [],
  714. partList2: [],
  715. dataListLoading: false,
  716. // 展示列集
  717. columnList: [
  718. {
  719. userId: this.$store.state.user.name,
  720. functionId: 610,
  721. serialNumber: '610Table1OrderNo',
  722. tableId: '610Table1',
  723. tableName: '收货入库任务表',
  724. columnProp: 'notifyNo',
  725. headerAlign: 'center',
  726. align: 'center',
  727. columnLabel: '单据号',
  728. columnHidden: false,
  729. columnImage: false,
  730. columnSortable: false,
  731. sortLv: 0,
  732. status: true,
  733. fixed: '',
  734. columnWidth: 120,
  735. },
  736. /* {
  737. userId: this.$store.state.user.name,
  738. functionId: 610,
  739. serialNumber: '610Table1OrderType',
  740. tableId: '610Table1',
  741. tableName: '收货入库任务表',
  742. columnProp: 'orderType',
  743. headerAlign: 'center',
  744. align: 'center',
  745. columnLabel: '单据类型',
  746. columnHidden: false,
  747. columnImage: false,
  748. columnSortable: false,
  749. sortLv: 0,
  750. status: true,
  751. fixed: '',
  752. columnWidth: 100,
  753. }, */
  754. {
  755. userId: this.$store.state.user.name,
  756. functionId: 610,
  757. serialNumber: '610Table1OrderStatus',
  758. tableId: '610Table1',
  759. tableName: '收货入库任务表',
  760. columnProp: 'status',
  761. headerAlign: 'center',
  762. align: 'left',
  763. columnLabel: '单据状态',
  764. columnHidden: false,
  765. columnImage: false,
  766. columnSortable: false,
  767. sortLv: 0,
  768. status: true,
  769. fixed: '',
  770. columnWidth: 100,
  771. },
  772. /* {
  773. userId: this.$store.state.user.name,
  774. functionId: 610,
  775. serialNumber: '610Table1SupplierId',
  776. tableId: '610Table1',
  777. tableName: '收货入库任务表',
  778. columnProp: 'supplierId',
  779. headerAlign: 'center',
  780. align: 'left',
  781. columnLabel: '供应商编码',
  782. columnHidden: false,
  783. columnImage: false,
  784. columnSortable: false,
  785. sortLv: 0,
  786. status: true,
  787. fixed: '',
  788. columnWidth: 120,
  789. },
  790. {
  791. userId: this.$store.state.user.name,
  792. functionId: 610,
  793. serialNumber: '610Table1SupplierName',
  794. tableId: '610Table1',
  795. tableName: '收货入库任务表',
  796. columnProp: 'supplierName',
  797. headerAlign: 'center',
  798. align: 'left',
  799. columnLabel: '供应商名称',
  800. columnHidden: false,
  801. columnImage: false,
  802. columnSortable: false,
  803. sortLv: 0,
  804. status: true,
  805. fixed: '',
  806. columnWidth: 200,
  807. }, */
  808. {
  809. userId: this.$store.state.user.name,
  810. functionId: 610,
  811. serialNumber: '610Table1RequiredInboundDate',
  812. tableId: '610Table1',
  813. tableName: '收货入库任务表',
  814. columnProp: 'notifyDate',
  815. headerAlign: 'center',
  816. align: 'center',
  817. columnLabel: '申请单日期',
  818. columnHidden: false,
  819. columnImage: false,
  820. columnSortable: false,
  821. sortLv: 0,
  822. status: true,
  823. fixed: '',
  824. columnWidth: 150,
  825. },
  826. {
  827. userId: this.$store.state.user.name,
  828. functionId: 610,
  829. serialNumber: '610Table1CreatedDate',
  830. tableId: '610Table1',
  831. tableName: '收货入库任务表',
  832. columnProp: 'enteredDate',
  833. headerAlign: 'center',
  834. align: 'center',
  835. columnLabel: '创建时间',
  836. columnHidden: false,
  837. columnImage: false,
  838. columnSortable: false,
  839. sortLv: 0,
  840. status: true,
  841. fixed: '',
  842. columnWidth: 170,
  843. },
  844. {
  845. userId: this.$store.state.user.name,
  846. functionId: 610,
  847. serialNumber: '610Table1CreatedBy',
  848. tableId: '610Table1',
  849. tableName: '收货入库任务表',
  850. columnProp: 'username',
  851. headerAlign: 'center',
  852. align: 'center',
  853. columnLabel: '创建人',
  854. columnHidden: false,
  855. columnImage: false,
  856. columnSortable: false,
  857. sortLv: 0,
  858. status: true,
  859. fixed: '',
  860. columnWidth: 100,
  861. },
  862. // rqrq - 添加推送WCS字段
  863. {
  864. userId: this.$store.state.user.name,
  865. functionId: 610,
  866. serialNumber: '610Table1PushWcsFlag',
  867. tableId: '610Table1',
  868. tableName: '收货入库任务表',
  869. columnProp: 'pushWcsFlag',
  870. headerAlign: 'center',
  871. align: 'center',
  872. columnLabel: '推送WCS',
  873. columnHidden: false,
  874. columnImage: false,
  875. columnSortable: false,
  876. sortLv: 0,
  877. status: true,
  878. fixed: '',
  879. columnWidth: 100,
  880. },
  881. /* {
  882. userId: this.$store.state.user.name,
  883. functionId: 610,
  884. serialNumber: '610Table1UpdatedDate',
  885. tableId: '610Table1',
  886. tableName: '收货入库任务表',
  887. columnProp: 'updatedDate',
  888. headerAlign: 'center',
  889. align: 'center',
  890. columnLabel: '更新时间',
  891. columnHidden: false,
  892. columnImage: false,
  893. columnSortable: false,
  894. sortLv: 0,
  895. status: true,
  896. fixed: '',
  897. columnWidth: 170,
  898. },
  899. {
  900. userId: this.$store.state.user.name,
  901. functionId: 610,
  902. serialNumber: '610Table1UpdatedBy',
  903. tableId: '610Table1',
  904. tableName: '收货入库任务表',
  905. columnProp: 'updatedBy',
  906. headerAlign: 'center',
  907. align: 'center',
  908. columnLabel: '更新人',
  909. columnHidden: false,
  910. columnImage: false,
  911. columnSortable: false,
  912. sortLv: 0,
  913. status: true,
  914. fixed: '',
  915. columnWidth: 100,
  916. }, */
  917. ],
  918. columnList2: [
  919. {
  920. userId: this.$store.state.user.name,
  921. functionId: 701001,
  922. serialNumber: '701001Table2Orderno',
  923. tableId: '701001Table2',
  924. tableName: '查询派工单',
  925. columnProp: 'orderNo',
  926. headerAlign: 'center',
  927. align: 'center',
  928. columnLabel: 'SHIPMENTID',
  929. columnHidden: false,
  930. columnImage: false,
  931. columnSortable: false,
  932. sortLv: 0,
  933. status: true,
  934. fixed: '',
  935. columnWidth: 120,
  936. },
  937. {
  938. userId: this.$store.state.user.name,
  939. functionId: 701001,
  940. serialNumber: '701001Table2Itemno',
  941. tableId: '701001Table2',
  942. tableName: '查询派工单',
  943. columnProp: 'itemNo',
  944. headerAlign: 'center',
  945. align: 'right',
  946. columnLabel: '工序',
  947. columnHidden: false,
  948. columnImage: false,
  949. columnSortable: false,
  950. sortLv: 0,
  951. status: true,
  952. fixed: '',
  953. columnWidth: 50,
  954. },
  955. {
  956. userId: this.$store.state.user.name,
  957. functionId: 701001,
  958. serialNumber: '701001Table2ItemDesc',
  959. tableId: '701001Table2',
  960. tableName: '查询派工单',
  961. columnProp: 'itemDesc',
  962. headerAlign: 'center',
  963. align: 'left',
  964. columnLabel: '工序名称',
  965. columnHidden: false,
  966. columnImage: false,
  967. columnSortable: false,
  968. sortLv: 0,
  969. status: true,
  970. fixed: '',
  971. columnWidth: 100,
  972. },
  973. {
  974. userId: this.$store.state.user.name,
  975. functionId: 701001,
  976. serialNumber: '701001Table2PartNo',
  977. tableId: '701001Table2',
  978. tableName: '查询派工单',
  979. columnProp: 'partNo',
  980. headerAlign: 'center',
  981. align: 'left',
  982. columnLabel: '物料编码',
  983. columnHidden: false,
  984. columnImage: false,
  985. columnSortable: false,
  986. sortLv: 0,
  987. status: true,
  988. fixed: '',
  989. columnWidth: 80,
  990. },
  991. {
  992. userId: this.$store.state.user.name,
  993. functionId: 701001,
  994. serialNumber: '701001Table2Qtyrequired',
  995. tableId: '701001Table2',
  996. tableName: '查询派工单',
  997. columnProp: 'qtyRequired',
  998. headerAlign: 'center',
  999. align: 'right',
  1000. columnLabel: '工单数量',
  1001. columnHidden: false,
  1002. columnImage: false,
  1003. columnSortable: false,
  1004. sortLv: 0,
  1005. status: true,
  1006. fixed: '',
  1007. columnWidth: 80,
  1008. },
  1009. {
  1010. userId: this.$store.state.user.name,
  1011. functionId: 701001,
  1012. serialNumber: '701001Table2Qtyreported',
  1013. tableId: '701001Table2',
  1014. tableName: '查询派工单',
  1015. columnProp: 'qtyReported',
  1016. headerAlign: 'center',
  1017. align: 'right',
  1018. columnLabel: '报工数量',
  1019. columnHidden: false,
  1020. columnImage: false,
  1021. columnSortable: false,
  1022. sortLv: 0,
  1023. status: true,
  1024. fixed: '',
  1025. columnWidth: 100,
  1026. },
  1027. {
  1028. userId: this.$store.state.user.name,
  1029. functionId: 701001,
  1030. serialNumber: '701001Table2SScheduleddate',
  1031. tableId: '701001Table2',
  1032. tableName: '查询工单',
  1033. columnProp: 'sScheduledDate',
  1034. headerAlign: 'center',
  1035. align: 'left',
  1036. columnLabel: '工单日期',
  1037. columnHidden: false,
  1038. columnImage: false,
  1039. columnSortable: false,
  1040. sortLv: 0,
  1041. status: true,
  1042. fixed: '',
  1043. columnWidth: 100,
  1044. },
  1045. {
  1046. userId: this.$store.state.user.name,
  1047. functionId: 701001,
  1048. serialNumber: '701001Table2SWorkcenterno',
  1049. tableId: '701001Table2',
  1050. tableName: '查询派工单',
  1051. columnProp: 'sWorkCenterNo',
  1052. headerAlign: 'center',
  1053. align: 'left',
  1054. columnLabel: '加工中心编码',
  1055. columnHidden: false,
  1056. columnImage: false,
  1057. columnSortable: false,
  1058. sortLv: 0,
  1059. status: true,
  1060. fixed: '',
  1061. columnWidth: 80,
  1062. },
  1063. {
  1064. userId: this.$store.state.user.name,
  1065. functionId: 701001,
  1066. serialNumber: '701001Table2WorkCenterDesc',
  1067. tableId: '701001Table2',
  1068. tableName: '查询工单',
  1069. columnProp: 'workCenterDesc',
  1070. headerAlign: 'center',
  1071. align: 'left',
  1072. columnLabel: '加工中心名称',
  1073. columnHidden: false,
  1074. columnImage: false,
  1075. columnSortable: false,
  1076. sortLv: 0,
  1077. status: true,
  1078. fixed: '',
  1079. columnWidth: 100,
  1080. },
  1081. {
  1082. userId: this.$store.state.user.name,
  1083. functionId: 701001,
  1084. serialNumber: '701001Table2SResourceid',
  1085. tableId: '701001Table2',
  1086. tableName: '查询派工单',
  1087. columnProp: 'sResourceID',
  1088. headerAlign: 'center',
  1089. align: 'left',
  1090. columnLabel: '机台编码',
  1091. columnHidden: false,
  1092. columnImage: false,
  1093. columnSortable: false,
  1094. sortLv: 0,
  1095. status: true,
  1096. fixed: '',
  1097. columnWidth: 60,
  1098. },
  1099. {
  1100. userId: this.$store.state.user.name,
  1101. functionId: 701001,
  1102. serialNumber: '701001Table2ResourceDesc',
  1103. tableId: '701001Table2',
  1104. tableName: '查询派工单',
  1105. columnProp: 'resourceDesc',
  1106. headerAlign: 'center',
  1107. align: 'left',
  1108. columnLabel: '机台名称',
  1109. columnHidden: false,
  1110. columnImage: false,
  1111. columnSortable: false,
  1112. sortLv: 0,
  1113. status: true,
  1114. fixed: '',
  1115. columnWidth: 100,
  1116. },
  1117. {
  1118. userId: this.$store.state.user.name,
  1119. functionId: 701001,
  1120. serialNumber: '701001Table2OperatorDesc',
  1121. tableId: '701001Table2',
  1122. tableName: '查询派工单',
  1123. columnProp: 'operatorDesc',
  1124. headerAlign: 'center',
  1125. align: 'left',
  1126. columnLabel: '操作员',
  1127. columnHidden: false,
  1128. columnImage: false,
  1129. columnSortable: false,
  1130. sortLv: 0,
  1131. status: true,
  1132. fixed: '',
  1133. columnWidth: 100,
  1134. },
  1135. ],
  1136. columnList3: [
  1137. {
  1138. userId: this.$store.state.user.name,
  1139. functionId: 701001,
  1140. serialNumber: '701001Table3ComponentPartNo',
  1141. tableId: '701001Table3',
  1142. tableName: '领料申请BOM子表',
  1143. columnProp: 'componentPartNo',
  1144. headerAlign: 'center',
  1145. align: 'left',
  1146. columnLabel: '物料编码',
  1147. columnHidden: false,
  1148. columnImage: false,
  1149. columnSortable: false,
  1150. sortLv: 0,
  1151. status: true,
  1152. fixed: '',
  1153. columnWidth: 80,
  1154. },
  1155. {
  1156. userId: this.$store.state.user.name,
  1157. functionId: 701001,
  1158. serialNumber: '701001Table3IsInWh',
  1159. tableId: '701001Table3',
  1160. tableName: '领料申请BOM子表',
  1161. columnProp: 'isInWh',
  1162. headerAlign: 'center',
  1163. align: 'center',
  1164. columnLabel: '是否在立库',
  1165. columnHidden: false,
  1166. columnImage: false,
  1167. columnSortable: false,
  1168. sortLv: 0,
  1169. status: true,
  1170. fixed: '',
  1171. columnWidth: 80,
  1172. },
  1173. {
  1174. userId: this.$store.state.user.name,
  1175. functionId: 701001,
  1176. serialNumber: '701001Table3PartDesc',
  1177. tableId: '701001Table3',
  1178. tableName: '领料申请BOM子表',
  1179. columnProp: 'componentPartDesc',
  1180. headerAlign: 'center',
  1181. align: 'left',
  1182. columnLabel: '物料描述',
  1183. columnHidden: false,
  1184. columnImage: false,
  1185. columnSortable: false,
  1186. sortLv: 0,
  1187. status: true,
  1188. fixed: '',
  1189. columnWidth: 120,
  1190. },
  1191. {
  1192. userId: this.$store.state.user.name,
  1193. functionId: 701001,
  1194. serialNumber: '701001Table3QtyToIssue',
  1195. tableId: '701001Table3',
  1196. tableName: '领料申请BOM子表',
  1197. columnProp: 'qtyOnHand',
  1198. headerAlign: 'center',
  1199. align: 'right',
  1200. columnLabel: '可发数量',
  1201. columnHidden: false,
  1202. columnImage: false,
  1203. columnSortable: false,
  1204. sortLv: 0,
  1205. status: true,
  1206. fixed: '',
  1207. columnWidth: 60,
  1208. },
  1209. {
  1210. userId: this.$store.state.user.name,
  1211. functionId: 701001,
  1212. serialNumber: '701001Table3QtyToIssue',
  1213. tableId: '701001Table3',
  1214. tableName: '领料申请BOM子表',
  1215. columnProp: 'qtyToIssue',
  1216. headerAlign: 'center',
  1217. align: 'right',
  1218. columnLabel: '本次发料数量',
  1219. columnHidden: false,
  1220. columnImage: false,
  1221. columnSortable: false,
  1222. sortLv: 0,
  1223. status: true,
  1224. fixed: '',
  1225. columnWidth: 60,
  1226. },
  1227. {
  1228. userId: this.$store.state.user.name,
  1229. functionId: 701001,
  1230. serialNumber: '701001Table3Remark',
  1231. tableId: '701001Table3',
  1232. tableName: '领料申请BOM子表',
  1233. columnProp: 'remark',
  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. ],
  1246. columnDetailList: [
  1247. {
  1248. userId: this.$store.state.user.name,
  1249. functionId: 701001,
  1250. serialNumber: '701001Table2Orderno',
  1251. tableId: '701001Table2',
  1252. tableName: '查询派工单',
  1253. columnProp: 'soorderNo',
  1254. headerAlign: 'center',
  1255. align: 'center',
  1256. columnLabel: 'SHIPMENTID',
  1257. columnHidden: false,
  1258. columnImage: false,
  1259. columnSortable: false,
  1260. sortLv: 0,
  1261. status: true,
  1262. fixed: '',
  1263. columnWidth: 120,
  1264. },
  1265. /* {
  1266. userId: this.$store.state.user.name,
  1267. functionId: 701001,
  1268. serialNumber: '701001Table2PartNo',
  1269. tableId: '701001Table2',
  1270. tableName: '查询派工单',
  1271. columnProp: 'fgpartNo',
  1272. headerAlign: 'center',
  1273. align: 'left',
  1274. columnLabel: '物料编码',
  1275. columnHidden: false,
  1276. columnImage: false,
  1277. columnSortable: false,
  1278. sortLv: 0,
  1279. status: true,
  1280. fixed: '',
  1281. columnWidth: 80,
  1282. }, */
  1283. /* {
  1284. userId: this.$store.state.user.name,
  1285. functionId: 701001,
  1286. serialNumber: '701001Table2PartNo',
  1287. tableId: '701001Table2',
  1288. tableName: '查询派工单',
  1289. columnProp: 'partDesc',
  1290. headerAlign: 'center',
  1291. align: 'left',
  1292. columnLabel: '物料名称',
  1293. columnHidden: false,
  1294. columnImage: false,
  1295. columnSortable: false,
  1296. sortLv: 0,
  1297. status: true,
  1298. fixed: '',
  1299. columnWidth: 120,
  1300. showOverflowTooltip: true,
  1301. }, */
  1302. /* {
  1303. userId: this.$store.state.user.name,
  1304. functionId: 701001,
  1305. serialNumber: '701001Table2Qtyrequired',
  1306. tableId: '701001Table2',
  1307. tableName: '查询派工单',
  1308. columnProp: 'lotSize',
  1309. headerAlign: 'center',
  1310. align: 'right',
  1311. columnLabel: '工单数量',
  1312. columnHidden: false,
  1313. columnImage: false,
  1314. columnSortable: false,
  1315. sortLv: 0,
  1316. status: true,
  1317. fixed: '',
  1318. columnWidth: 80,
  1319. }, */
  1320. /* {
  1321. userId: this.$store.state.user.name,
  1322. functionId: 701001,
  1323. serialNumber: '701001Table2Qtyreported',
  1324. tableId: '701001Table2',
  1325. tableName: '查询派工单',
  1326. columnProp: 'unissureQty',
  1327. headerAlign: 'center',
  1328. align: 'right',
  1329. columnLabel: '退料数量',
  1330. columnHidden: false,
  1331. columnImage: false,
  1332. columnSortable: false,
  1333. sortLv: 0,
  1334. status: true,
  1335. fixed: '',
  1336. columnWidth: 80,
  1337. }, */
  1338. {
  1339. userId: this.$store.state.user.name,
  1340. functionId: 701001,
  1341. serialNumber: '701001Table2SScheduleddate',
  1342. tableId: '701001Table2',
  1343. tableName: '查询工单',
  1344. columnProp: 'needDate',
  1345. headerAlign: 'center',
  1346. align: 'left',
  1347. columnLabel: '运输日期',
  1348. columnHidden: false,
  1349. columnImage: false,
  1350. columnSortable: false,
  1351. sortLv: 0,
  1352. status: true,
  1353. fixed: '',
  1354. columnWidth: 100,
  1355. },
  1356. {
  1357. userId: this.$store.state.user.name,
  1358. functionId: 701001,
  1359. serialNumber: '701001Table2PushWmsFlag',
  1360. tableId: '701001Table2',
  1361. tableName: '查询派工单',
  1362. columnProp: 'pushWmsFlag',
  1363. headerAlign: 'center',
  1364. align: 'center',
  1365. columnLabel: '是否推送WCS',
  1366. columnHidden: false,
  1367. columnImage: false,
  1368. columnSortable: false,
  1369. sortLv: 0,
  1370. status: true,
  1371. fixed: '',
  1372. columnWidth: 120,
  1373. },
  1374. {
  1375. userId: this.$store.state.user.name,
  1376. functionId: 701001,
  1377. serialNumber: '701001Table2TransportFlag',
  1378. tableId: '701001Table2',
  1379. tableName: '查询派工单',
  1380. columnProp: 'transportFlag',
  1381. headerAlign: 'center',
  1382. align: 'center',
  1383. columnLabel: '立库取出',
  1384. columnHidden: false,
  1385. columnImage: false,
  1386. columnSortable: false,
  1387. sortLv: 0,
  1388. status: true,
  1389. fixed: '',
  1390. columnWidth: 80,
  1391. },
  1392. {
  1393. userId: this.$store.state.user.name,
  1394. functionId: 701001,
  1395. serialNumber: '701001Table2AreaDesc',
  1396. tableId: '701001Table2',
  1397. tableName: '查询派工单',
  1398. columnProp: 'areaDesc',
  1399. headerAlign: 'center',
  1400. align: 'left',
  1401. columnLabel: '配送区域',
  1402. columnHidden: false,
  1403. columnImage: false,
  1404. columnSortable: false,
  1405. sortLv: 0,
  1406. status: true,
  1407. fixed: '',
  1408. columnWidth: 100,
  1409. },
  1410. /* {
  1411. userId: this.$store.state.user.name,
  1412. functionId: 701001,
  1413. serialNumber: '701001Table2SScheduleddate',
  1414. tableId: '701001Table2',
  1415. tableName: '查询工单',
  1416. columnProp: 'finishDate',
  1417. headerAlign: 'center',
  1418. align: 'left',
  1419. columnLabel: '工单结束日期',
  1420. columnHidden: false,
  1421. columnImage: false,
  1422. columnSortable: false,
  1423. sortLv: 0,
  1424. status: true,
  1425. fixed: '',
  1426. columnWidth: 100,
  1427. },
  1428. {
  1429. userId: this.$store.state.user.name,
  1430. functionId: 701001,
  1431. serialNumber: '701001Table2SWorkcenterno',
  1432. tableId: '701001Table2',
  1433. tableName: '查询派工单',
  1434. columnProp: 'sWorkCenterNo',
  1435. headerAlign: 'center',
  1436. align: 'left',
  1437. columnLabel: '加工中心编码',
  1438. columnHidden: false,
  1439. columnImage: false,
  1440. columnSortable: false,
  1441. sortLv: 0,
  1442. status: true,
  1443. fixed: '',
  1444. columnWidth: 80,
  1445. },
  1446. {
  1447. userId: this.$store.state.user.name,
  1448. functionId: 701001,
  1449. serialNumber: '701001Table2WorkCenterDesc',
  1450. tableId: '701001Table2',
  1451. tableName: '查询工单',
  1452. columnProp: 'workCenterDesc',
  1453. headerAlign: 'center',
  1454. align: 'left',
  1455. columnLabel: '加工中心名称',
  1456. columnHidden: false,
  1457. columnImage: false,
  1458. columnSortable: false,
  1459. sortLv: 0,
  1460. status: true,
  1461. fixed: '',
  1462. columnWidth: 100,
  1463. },
  1464. {
  1465. userId: this.$store.state.user.name,
  1466. functionId: 701001,
  1467. serialNumber: '701001Table2SResourceid',
  1468. tableId: '701001Table2',
  1469. tableName: '查询派工单',
  1470. columnProp: 'sResourceID',
  1471. headerAlign: 'center',
  1472. align: 'left',
  1473. columnLabel: '机台编码',
  1474. columnHidden: false,
  1475. columnImage: false,
  1476. columnSortable: false,
  1477. sortLv: 0,
  1478. status: true,
  1479. fixed: '',
  1480. columnWidth: 60,
  1481. },
  1482. {
  1483. userId: this.$store.state.user.name,
  1484. functionId: 701001,
  1485. serialNumber: '701001Table2OperatorDesc',
  1486. tableId: '701001Table2',
  1487. tableName: '查询派工单',
  1488. columnProp: 'operatorDesc',
  1489. headerAlign: 'center',
  1490. align: 'left',
  1491. columnLabel: '操作员',
  1492. columnHidden: false,
  1493. columnImage: false,
  1494. columnSortable: false,
  1495. sortLv: 0,
  1496. status: true,
  1497. fixed: '',
  1498. columnWidth: 100,
  1499. },*/
  1500. ],
  1501. columnDetailList2: [
  1502. {
  1503. columnProp: 'subNo',
  1504. headerAlign: 'center',
  1505. align: 'left',
  1506. columnLabel: '标签条码',
  1507. columnHidden: false,
  1508. columnImage: false,
  1509. columnSortable: false,
  1510. sortLv: 0,
  1511. status: true,
  1512. fixed: '',
  1513. columnWidth: 100,
  1514. },
  1515. {
  1516. columnProp: 'subQty',
  1517. headerAlign: 'center',
  1518. align: 'right',
  1519. columnLabel: '入库数量',
  1520. columnHidden: false,
  1521. columnImage: false,
  1522. columnSortable: false,
  1523. sortLv: 0,
  1524. status: true,
  1525. fixed: '',
  1526. columnWidth: 100,
  1527. },
  1528. {
  1529. columnProp: 'orderRef3',
  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. {
  1542. columnProp: 'orderRef4',
  1543. headerAlign: 'center',
  1544. align: 'left',
  1545. columnLabel: '入库库位',
  1546. columnHidden: false,
  1547. columnImage: false,
  1548. columnSortable: false,
  1549. sortLv: 0,
  1550. status: true,
  1551. fixed: '',
  1552. columnWidth: 150,
  1553. },
  1554. {
  1555. columnProp: 'userName',
  1556. headerAlign: 'center',
  1557. align: 'left',
  1558. columnLabel: '操作员',
  1559. columnHidden: false,
  1560. columnImage: false,
  1561. columnSortable: false,
  1562. sortLv: 0,
  1563. status: true,
  1564. fixed: '',
  1565. columnWidth: 100,
  1566. },
  1567. {
  1568. columnProp: 'transDate',
  1569. headerAlign: 'center',
  1570. align: 'center',
  1571. columnLabel: '操作时间',
  1572. columnHidden: false,
  1573. columnImage: false,
  1574. columnSortable: false,
  1575. sortLv: 0,
  1576. status: true,
  1577. fixed: '',
  1578. columnWidth: 170,
  1579. },
  1580. ],
  1581. // rqrq - 预留标签清单数据和列定义
  1582. dataList7: [],
  1583. columnList6: [
  1584. {
  1585. userId: this.$store.state.user.name,
  1586. functionId: 444002,
  1587. serialNumber: '444002Table6ItemNo',
  1588. tableId: '444002Table6',
  1589. tableName: '预留标签清单表',
  1590. columnProp: 'itemNo',
  1591. headerAlign: 'center',
  1592. align: 'right',
  1593. columnLabel: '订单序号',
  1594. columnHidden: false,
  1595. columnImage: false,
  1596. columnSortable: false,
  1597. sortLv: 0,
  1598. status: true,
  1599. fixed: '',
  1600. columnWidth: 80,
  1601. },
  1602. {
  1603. userId: this.$store.state.user.name,
  1604. functionId: 444002,
  1605. serialNumber: '444002Table6BomItemNo',
  1606. tableId: '444002Table6',
  1607. tableName: '预留标签清单表',
  1608. columnProp: 'bomItemNo',
  1609. headerAlign: 'center',
  1610. align: 'right',
  1611. columnLabel: '订单物料行号',
  1612. columnHidden: false,
  1613. columnImage: false,
  1614. columnSortable: false,
  1615. sortLv: 0,
  1616. status: true,
  1617. fixed: '',
  1618. columnWidth: 110,
  1619. },
  1620. {
  1621. userId: this.$store.state.user.name,
  1622. functionId: 444002,
  1623. serialNumber: '444002Table6SerialNo',
  1624. tableId: '444002Table6',
  1625. tableName: '预留标签清单表',
  1626. columnProp: 'serialNo',
  1627. headerAlign: 'center',
  1628. align: 'center',
  1629. columnLabel: '标签号',
  1630. columnHidden: false,
  1631. columnImage: false,
  1632. columnSortable: false,
  1633. sortLv: 0,
  1634. status: true,
  1635. fixed: '',
  1636. columnWidth: 150,
  1637. },
  1638. {
  1639. userId: this.$store.state.user.name,
  1640. functionId: 444002,
  1641. serialNumber: '444002Table6TaskRef',
  1642. tableId: '444002Table6',
  1643. tableName: '预留标签清单表',
  1644. columnProp: 'taskRef',
  1645. headerAlign: 'center',
  1646. align: 'center',
  1647. columnLabel: '立库任务号',
  1648. columnHidden: false,
  1649. columnImage: false,
  1650. columnSortable: false,
  1651. sortLv: 0,
  1652. status: true,
  1653. fixed: '',
  1654. columnWidth: 120,
  1655. },
  1656. {
  1657. userId: this.$store.state.user.name,
  1658. functionId: 444002,
  1659. serialNumber: '444002Table6TaskItem',
  1660. tableId: '444002Table6',
  1661. tableName: '预留标签清单表',
  1662. columnProp: 'taskItem',
  1663. headerAlign: 'center',
  1664. align: 'right',
  1665. columnLabel: '立库任务行号',
  1666. columnHidden: false,
  1667. columnImage: false,
  1668. columnSortable: false,
  1669. sortLv: 0,
  1670. status: true,
  1671. fixed: '',
  1672. columnWidth: 110,
  1673. },
  1674. {
  1675. userId: this.$store.state.user.name,
  1676. functionId: 444002,
  1677. serialNumber: '444002Table6OutWcsFlag',
  1678. tableId: '444002Table6',
  1679. tableName: '预留标签清单表',
  1680. columnProp: 'outWcsFlag',
  1681. headerAlign: 'center',
  1682. align: 'center',
  1683. columnLabel: '立库取出',
  1684. columnHidden: false,
  1685. columnImage: false,
  1686. columnSortable: false,
  1687. sortLv: 0,
  1688. status: true,
  1689. fixed: '',
  1690. columnWidth: 80,
  1691. },
  1692. ],
  1693. rules: {
  1694. bu: [
  1695. {
  1696. required: true,
  1697. message: ' ',
  1698. trigger: ['blur', 'change'],
  1699. },
  1700. ],
  1701. orderType: [
  1702. {
  1703. required: true,
  1704. message: ' ',
  1705. trigger: ['blur', 'change'],
  1706. },
  1707. ],
  1708. requiredInboundDate: [
  1709. {
  1710. required: true,
  1711. message: ' ',
  1712. trigger: ['blur', 'change'],
  1713. },
  1714. ],
  1715. },
  1716. searchLoading: false,
  1717. saveLoading: false,
  1718. activeTable: 'inboundDetail',
  1719. detailModal: false,
  1720. authSearch: false,
  1721. authSave: false,
  1722. authUpdate: false,
  1723. authDelete: false,
  1724. authArchive: false,
  1725. authClose: false,
  1726. authIssue: false,
  1727. editBatchVisible: false,
  1728. menuId: this.$route.meta.menuId,
  1729. tempWareHouseRow: {},
  1730. detailList2: [],
  1731. detailModal2: false,
  1732. currentRow: {},
  1733. seqNoList:[],
  1734. seqNoModalFlag: false,
  1735. saveSeqNoModalFlag: false,
  1736. bomLoadFlag: false,
  1737. sobomList: [],
  1738. itemNo: '',
  1739. materialModalFlag: false,
  1740. sobomData:{},
  1741. notifyNo:'',
  1742. // rqrq - 库存预览相关变量
  1743. previewDialogVisible: false,
  1744. previewLoading: false,
  1745. pushLoading: false,
  1746. previewData: [],
  1747. currentNotifyRow: null,
  1748. }
  1749. },
  1750. mounted() {
  1751. this.$nextTick(() => {
  1752. this.height = window.innerHeight / 2 - 100
  1753. /*第二个表格高度的动态调整*/
  1754. this.secondHeight = window.innerHeight - this.height - 170
  1755. })
  1756. },
  1757. created() {
  1758. // 按钮控制
  1759. this.getButtonAuthData()
  1760. // 获取用户的 site 和 bu
  1761. //this.getSiteAndBuByUserName()
  1762. // 动态列
  1763. //this.getTableUserColumn(this.$route.meta.menuId + 'table1', 1)
  1764. //this.getTableUserColumn(this.$route.meta.menuId + 'table2', 2)
  1765. if (!this.authSearch) {
  1766. // 获取数据列表
  1767. this.getDataList()
  1768. }
  1769. },
  1770. methods: {
  1771. // 获取用户的bu
  1772. getSiteAndBuByUserName() {
  1773. let tempData = {
  1774. username: this.$store.state.user.name,
  1775. }
  1776. getSiteAndBuByUserName(tempData).then(({ data }) => {
  1777. if (data.code === 0) {
  1778. this.userBuList = data.rows
  1779. }
  1780. })
  1781. },
  1782. // 获取数据列表
  1783. getDataList() {
  1784. this.searchData.site = this.$store.state.user.site // rqrq - 设置site
  1785. this.searchData.limit = this.pageSize
  1786. this.searchData.page = this.pageIndex
  1787. this.searchData.orderStatus = this.searchData.orderStatusList.join(',')
  1788. console.log("this.",this.searchData);
  1789. this.searchLoading = true
  1790. searchNotifyHeader(this.searchData)
  1791. .then(({ data }) => {
  1792. if (data.code === 0) {
  1793. this.dataList = data.page.list
  1794. this.pageIndex = data.page.currPage
  1795. this.pageSize = data.page.pageSize
  1796. this.totalPage = data.page.totalCount
  1797. console.log("this.dataList",this.dataList);
  1798. // 判断是否全部存在数据
  1799. if (this.dataList.length > 0) {
  1800. // 设置选中行并高亮第一行
  1801. this.$nextTick(() => {
  1802. this.$refs.inboundTable.setCurrentRow(this.dataList[0])
  1803. this.currentRow = JSON.parse(JSON.stringify(this.dataList[0]))
  1804. // 调用getNotifyNoDetail方法获取入库明细
  1805. this.getNotifyNoDetail()
  1806. })
  1807. } else {
  1808. this.currentRow = {}
  1809. this.detailList = []
  1810. }
  1811. }
  1812. })
  1813. .finally(() => {
  1814. this.searchLoading = false
  1815. })
  1816. },
  1817. // 每页数
  1818. sizeChangeHandle(val) {
  1819. this.pageSize = val
  1820. this.pageIndex = 1
  1821. this.getDataList()
  1822. },
  1823. // 当前页
  1824. currentChangeHandle(val) {
  1825. this.pageIndex = val
  1826. this.getDataList()
  1827. },
  1828. // 子明细每页数
  1829. sizeChangeHandle2(val) {
  1830. this.pageSize2 = val
  1831. this.pageIndex2 = 1
  1832. this.searchTypeChange()
  1833. },
  1834. // 子明细当前页
  1835. currentChangeHandle2(val) {
  1836. this.pageIndex2 = val
  1837. this.searchTypeChange()
  1838. },
  1839. saveModal() {
  1840. this.modalData = {
  1841. flag: '1',
  1842. site: '',
  1843. orderNo: '',
  1844. orderType: '',
  1845. orderStatus: '',
  1846. requiredInboundDate: '',
  1847. supplierId: '',
  1848. supplierName: '',
  1849. remarks: '',
  1850. createdBy: this.$store.state.user.name,
  1851. }
  1852. this.modalDisableFlag = false
  1853. this.modalFlag = true
  1854. },
  1855. updateModal(row) {
  1856. if (this.currentRow.orderType === '采购入库') {
  1857. this.$message.warning('采购入库单据不能编辑!')
  1858. return
  1859. }
  1860. this.modalData = {
  1861. flag: '2',
  1862. site: row.site,
  1863. bu: row.site + '_' + row.buNo,
  1864. buNo: row.buNo,
  1865. orderNo: row.orderNo,
  1866. orderType: row.orderType,
  1867. requiredInboundDate: row.requiredInboundDate,
  1868. supplierId: row.supplierId,
  1869. supplierName: row.supplierName,
  1870. remarks: row.remarks,
  1871. updatedBy: this.$store.state.user.name,
  1872. }
  1873. this.modalDisableFlag = true
  1874. this.modalFlag = true
  1875. },
  1876. saveData() {
  1877. if (this.modalData.orderType === '' || this.modalData.orderType == null) {
  1878. this.$message.warning('请选择单据类型!')
  1879. return
  1880. }
  1881. if (
  1882. this.modalData.requiredInboundDate === '' ||
  1883. this.modalData.requiredInboundDate == null
  1884. ) {
  1885. this.$message.warning('请选择要求入库日期!')
  1886. return
  1887. }
  1888. this.saveLoading = true
  1889. if (this.modalData.flag === '1') {
  1890. // 新增
  1891. this.modalData.orderType = '退料入库'
  1892. this.modalData.site = localStorage.getItem('site')
  1893. createNotify(this.modalData)
  1894. .then(({ data }) => {
  1895. if (data && data.code === 0) {
  1896. this.getDataList()
  1897. this.modalFlag = false
  1898. this.$message.success('操作成功')
  1899. } else {
  1900. this.$message.error(data.msg)
  1901. }
  1902. })
  1903. .finally(() => {
  1904. this.saveLoading = false
  1905. })
  1906. } else {
  1907. // 修改
  1908. updateInboundNotification(this.modalData)
  1909. .then(({ data }) => {
  1910. if (data && data.code === 0) {
  1911. this.getDataList()
  1912. this.modalFlag = false
  1913. this.$message.success('操作成功')
  1914. } else {
  1915. this.$message.error(data.msg)
  1916. }
  1917. })
  1918. .finally(() => {
  1919. this.saveLoading = false
  1920. })
  1921. }
  1922. },
  1923. // 删除
  1924. deleteModal() {
  1925. if (this.currentRow.orderType === '采购入库') {
  1926. this.$message.warning('采购入库单据不能编辑!')
  1927. return
  1928. }
  1929. if (this.inboundSelection.length === 0) {
  1930. this.$message.warning('请勾选要删除的单据!')
  1931. return
  1932. }
  1933. this.$confirm(
  1934. `是否删除该 ` + this.inboundSelection.length + ` 条记录?`,
  1935. '提示',
  1936. {
  1937. confirmButtonText: '确定',
  1938. cancelButtonText: '取消',
  1939. type: 'warning',
  1940. }
  1941. ).then(() => {
  1942. let tempData = {
  1943. submitList: this.inboundSelection,
  1944. }
  1945. deleteInboundNotification(tempData).then(({ data }) => {
  1946. if (data && data.code === 0) {
  1947. this.getDataList()
  1948. this.inboundSelection = []
  1949. this.$message.success('操作成功')
  1950. } else {
  1951. this.$message.error(data.msg)
  1952. }
  1953. })
  1954. })
  1955. },
  1956. // 归档
  1957. archiveModal() {},
  1958. // 关闭
  1959. closeModal(row) {
  1960. this.$confirm(
  1961. `确认关闭 ` + row.notifyNo + ` 记录?`,
  1962. '提示',
  1963. {
  1964. confirmButtonText: '确定',
  1965. cancelButtonText: '取消',
  1966. type: 'warning',
  1967. }
  1968. ).then(() => {
  1969. closeInboundNotification(row).then(({ data }) => {
  1970. if (data && data.code === 0) {
  1971. this.getDataList()
  1972. this.$message.success('操作成功')
  1973. } else {
  1974. this.$message.error(data.msg)
  1975. }
  1976. })
  1977. })
  1978. },
  1979. // 下达
  1980. issueModal(row) {
  1981. if (this.currentRow.orderType === '采购入库') {
  1982. this.$message.warning('采购入库单据不能编辑!')
  1983. return
  1984. }
  1985. issueInboundNotification(row).then(({ data }) => {
  1986. if (data && data.code === 0) {
  1987. this.getDataList()
  1988. this.$message.success('操作成功')
  1989. } else {
  1990. this.$message.error(data.msg)
  1991. }
  1992. })
  1993. },
  1994. // 列表表格选择替换
  1995. tabClick(tab, event) {
  1996. // 刷新列表数据
  1997. this.refreshCurrentTabTable()
  1998. },
  1999. // 当前值发生变化的时候修改
  2000. changeCurrentRow(row, oldRow) {
  2001. // 判断是否是获取焦点的事件
  2002. if (row) {
  2003. this.currentRow = JSON.parse(JSON.stringify(row))
  2004. //刷新当前页表
  2005. this.getNotifyNoDetail()
  2006. }
  2007. },
  2008. // 复选
  2009. selectionInbound(val) {
  2010. this.inboundSelection = val
  2011. },
  2012. // 明细复选
  2013. selectionInboundDetail(val) {
  2014. this.inboundDetailSelection = val
  2015. },
  2016. rowStyle({ row }) {
  2017. if (this.currentRow.notifyNo === row.notifyNo) {
  2018. return { 'background-color': '#E8F7F6', cursor: 'pointer' }
  2019. }
  2020. },
  2021. // 单机选中信息
  2022. inboundClickRow(row, column) {
  2023. console.log("row",row);
  2024. this.currentRow = JSON.parse(JSON.stringify(row))
  2025. // 点击主表行时,立即刷新并加载入库明细
  2026. this.getNotifyNoDetail()
  2027. },
  2028. // 刷新页签的table数据
  2029. refreshCurrentTabTable() {
  2030. if (this.activeTable === 'inboundDetail') {
  2031. this.getInboundDetail()
  2032. } else if (this.activeTable === 'labelDetail') {
  2033. // rqrq - 查询预留标签清单
  2034. this.searchMaterialListDetail()
  2035. }
  2036. },
  2037. // rqrq - 查询预留标签清单
  2038. searchMaterialListDetail() {
  2039. if (!this.currentRow || !this.currentRow.notifyNo) {
  2040. this.dataList7 = []
  2041. return
  2042. }
  2043. const queryData = {
  2044. site: this.currentRow.site || this.$store.state.user.site,
  2045. notifyNo: this.currentRow.notifyNo
  2046. }
  2047. this.searchLoading = true
  2048. searchMaterialListDetail(queryData)
  2049. .then(({ data }) => {
  2050. this.searchLoading = false
  2051. if (data && data.code === 0) {
  2052. this.dataList7 = data.rows || []
  2053. } else {
  2054. this.dataList7 = []
  2055. }
  2056. })
  2057. .catch(() => {
  2058. this.searchLoading = false
  2059. this.dataList7 = []
  2060. })
  2061. },
  2062. // 查询物料缺陷跟踪
  2063. getInboundDetail() {
  2064. let templateData = {
  2065. site: this.currentRow.site,
  2066. buNo: this.currentRow.buNo,
  2067. orderNo: this.currentRow.orderNo,
  2068. }
  2069. /* getInboundDetail(templateData).then(({ data }) => {
  2070. this.detailList = data.rows
  2071. }) */
  2072. },
  2073. // 新增明细
  2074. addInboundDetailModal() {
  2075. if (this.currentRow.orderType === '采购入库') {
  2076. this.$message.warning('采购入库单据不能编辑!')
  2077. return
  2078. }
  2079. this.detailSearchData = {
  2080. site: this.currentRow.site,
  2081. buNo: this.currentRow.buNo,
  2082. orderNo: this.currentRow.orderNo,
  2083. orderType: this.currentRow.orderType,
  2084. relatedOrderNo: '',
  2085. status: '',
  2086. partNo: '',
  2087. partDesc: '',
  2088. partNos: '',
  2089. page: 1,
  2090. limit: 10,
  2091. }
  2092. this.partSelections1 = []
  2093. this.partSelections2 = []
  2094. this.partList1 = []
  2095. this.partList2 = []
  2096. this.pageIndex2 = 1
  2097. this.pageSize2 = 20
  2098. this.totalPage2 = 0
  2099. if (this.currentRow.orderType === '生产入库') {
  2100. this.detailSearchData.status = '已开工'
  2101. }
  2102. this.handleGetProjectPartList()
  2103. },
  2104. handleGetProjectPartList() {
  2105. this.detailSearchData.limit = this.pageSize2
  2106. this.detailSearchData.page = this.pageIndex2
  2107. getInboundPartList(this.detailSearchData).then(({ data }) => {
  2108. if (data && data.code === 0) {
  2109. this.partList1 = data.page.list
  2110. this.pageIndex2 = data.page.currPage
  2111. this.pageSize2 = data.page.pageSize
  2112. this.totalPage2 = data.page.totalCount
  2113. this.detailModal = true
  2114. }
  2115. })
  2116. },
  2117. chooseSOSModal() {
  2118. this.seqNoData = {
  2119. site: localStorage.getItem('site'),
  2120. orderno: '',
  2121. seqno: '',
  2122. sResourceid: '',
  2123. sWorkcenterno: '',
  2124. operatorId: '',
  2125. sShiftno: '',
  2126. startDate: this.dayjs().format('YYYY-MM-DD'),
  2127. endDate: this.dayjs().format('YYYY-MM-DD'),
  2128. }
  2129. this.searchSOSRouting()
  2130. this.seqNoModalFlag = true
  2131. },
  2132. searchSOSRouting() {
  2133. getSOScheduledRoutingListForIssure(this.seqNoData).then(({ data }) => {
  2134. if (data.code === 0) {
  2135. this.seqNoList = data.rows
  2136. }
  2137. })
  2138. },
  2139. // 可选物料
  2140. partClickRow1(row) {
  2141. this.$refs.partTable1.toggleRowSelection(row)
  2142. },
  2143. // 已有物料
  2144. partClickRow2(row) {
  2145. this.$refs.partTable2.toggleRowSelection(row)
  2146. },
  2147. selectionPart1(val) {
  2148. this.partSelections1 = val
  2149. },
  2150. selectionPart2(val) {
  2151. this.partSelections2 = val
  2152. },
  2153. chooseSOS(row) {
  2154. if (this.dataList.length > 0) {
  2155. let stop = false
  2156. for (let i = 0; i < this.dataList.length; i++) {
  2157. if (this.dataList[i].seqNo == row.seqno) {
  2158. stop = true
  2159. }
  2160. }
  2161. if (stop) {
  2162. this.$alert('已经选择过此派工单,请返回点击明细直接操作!!', '提示', {
  2163. confirmButtonText: '确定',
  2164. })
  2165. return false
  2166. }
  2167. }
  2168. this.notifyOrderData.partNo = row.partNo
  2169. this.notifyOrderData.orderNo = row.orderNo
  2170. this.notifyOrderData.itemNo = row.itemNo
  2171. this.notifyOrderData.seqNo = row.seqNo
  2172. this.notifyOrderData.partDesc = row.partDesc
  2173. this.notifyOrderData.qtyRequired = row.qtyRequired
  2174. this.notifyOrderData.sResourceID = row.sResourceID
  2175. this.notifyOrderData.issureQty = ''
  2176. this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
  2177. this.notifyOrderData.locationNo = row.sResourceID
  2178. this.saveSeqNoModalFlag = true
  2179. },
  2180. qtyAllForSeqNo() {
  2181. this.notifyOrderData.issureQty = this.notifyOrderData.qtyRequired
  2182. },
  2183. saveSOS() {
  2184. if (
  2185. this.notifyOrderData.needDate == null ||
  2186. this.notifyOrderData.needDate == ''
  2187. ) {
  2188. this.$message.warning('请选择时间!')
  2189. return false
  2190. }
  2191. if (
  2192. this.notifyOrderData.issureQty == null ||
  2193. this.notifyOrderData.issureQty == '' ||
  2194. this.notifyOrderData.issureQty <= 0
  2195. ) {
  2196. this.$message.warning('请填写领取数量!')
  2197. return false
  2198. }
  2199. let row = this.notifyOrderData
  2200. if (this.dataList.length > 0) {
  2201. let stop = false
  2202. for (let i = 0; i < this.dataList.length; i++) {
  2203. if (this.dataList[i].seqNo == row.seqno) {
  2204. stop = true
  2205. }
  2206. }
  2207. if (stop) {
  2208. this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
  2209. confirmButtonText: '确定',
  2210. })
  2211. return false
  2212. }
  2213. }
  2214. this.$confirm('确定选择工单' + row.seqno + '?', '提示', {
  2215. confirmButtonText: '确定',
  2216. cancelButtonText: '取消',
  2217. type: 'warning',
  2218. }).then(() => {
  2219. let inData = {
  2220. site: localStorage.getItem('site'),
  2221. notifyNo: this.notifyNo,
  2222. fGPartNo: row.partNo,
  2223. sOOrderNo: row.orderno,
  2224. opsItemNo: row.itemno,
  2225. seqNo: row.seqno,
  2226. locationNo: row.locationNo,
  2227. needDate: row.needDate,
  2228. issureQty: row.issureQty,
  2229. }
  2230. saveSOIssueNotifyOrderList(inData).then(({ data }) => {
  2231. if (data.code === 0) {
  2232. this.saveSeqNoModalFlag = false
  2233. this.getNotifyNoDetail()
  2234. this.enterSOS(row)
  2235. this.itemNo = data.itemNo
  2236. } else {
  2237. this.$alert(data.msg, '错误', {
  2238. confirmButtonText: '确定',
  2239. })
  2240. }
  2241. })
  2242. })
  2243. },
  2244. getNotifyNoDetail() {
  2245. if (!this.currentRow || !this.currentRow.notifyNo) {
  2246. this.detailList = []
  2247. return
  2248. }
  2249. let inData = {
  2250. site: this.currentRow.site || localStorage.getItem('site'),
  2251. notifyNo: this.currentRow.notifyNo,
  2252. }
  2253. getNotifyNoDetail(inData).then(({ data }) => {
  2254. if (data.code === 0) {
  2255. this.detailList = data.rows || []
  2256. } else {
  2257. this.detailList = []
  2258. }
  2259. }).catch(() => {
  2260. this.detailList = []
  2261. })
  2262. },
  2263. enterSOS(row) {
  2264. this.seqNoModalFlag = false
  2265. this.materialModalFlag = true
  2266. this.sobomList = []
  2267. this.sobomData = {
  2268. orderno: row.orderno,
  2269. seqno: row.seqno,
  2270. partNo: row.partNo,
  2271. }
  2272. this.bomLoadFlag = true
  2273. let inData = {
  2274. site: localStorage.getItem('site'),
  2275. notifyNo: this.notifyNo,
  2276. orderno: row.orderno,
  2277. seqno: row.seqno,
  2278. partNo: row.partNo,
  2279. itemno: row.itemno,
  2280. }
  2281. getSOSBOMForIssure(inData).then(({ data }) => {
  2282. this.bomLoadFlag = false
  2283. if (data.code === 0) {
  2284. this.sobomList = data.rows
  2285. }
  2286. })
  2287. },
  2288. // 改变事件
  2289. searchTypeChange() {
  2290. // 使用 map 提取 partNo 并加上单引号
  2291. let partNos = this.partList2.map((part) => part.partNo)
  2292. // 使用 join 将 partNo 连接成一个字符串
  2293. this.detailSearchData.partNos = partNos.join(',')
  2294. this.handleGetProjectPartList()
  2295. },
  2296. // 添加物料
  2297. addPart() {
  2298. if (this.partSelections1 == null || this.partSelections1.length === 0) {
  2299. this.$message.warning('请选择可选物料!')
  2300. return
  2301. }
  2302. this.partSelections1.forEach((item) => {
  2303. this.partList2.push(item)
  2304. })
  2305. this.searchTypeChange()
  2306. },
  2307. // 删除物料
  2308. deletePart() {
  2309. if (this.partSelections2 == null || this.partSelections2.length === 0) {
  2310. this.$message.warning('请选择已选物料!')
  2311. return
  2312. }
  2313. this.partSelections2.forEach((item) => {
  2314. // 使用 filter 过滤掉 partList2 中与 selection.part_no 相同的项
  2315. this.partList2 = this.partList2.filter(
  2316. (part) => part.partNo !== item.partNo
  2317. )
  2318. })
  2319. this.searchTypeChange()
  2320. },
  2321. // 新增明细
  2322. saveInboundDetail() {
  2323. let tempData = {
  2324. orderNo: this.detailSearchData.orderNo,
  2325. createdBy: this.$store.state.user.name,
  2326. partList: this.partList2,
  2327. }
  2328. this.saveLoading = true
  2329. saveInboundDetail(tempData)
  2330. .then(({ data }) => {
  2331. if (data && data.code === 0) {
  2332. this.getInboundDetail()
  2333. this.detailModal = false
  2334. this.$message.success('操作成功')
  2335. } else {
  2336. this.$message.error(data.msg)
  2337. }
  2338. })
  2339. .finally(() => {
  2340. this.saveLoading = false
  2341. })
  2342. },
  2343. // 删除物料缺陷跟踪
  2344. deleteInboundDetail() {
  2345. if (this.currentRow.orderType === '采购入库') {
  2346. this.$message.warning('采购入库单据不能编辑!')
  2347. return
  2348. }
  2349. if (this.inboundDetailSelection.length === 0) {
  2350. this.$message.warning('请勾选要删除的单据!')
  2351. return
  2352. }
  2353. this.$confirm(
  2354. `是否删除该 ` + this.inboundDetailSelection.length + ` 条记录?`,
  2355. '提示',
  2356. {
  2357. confirmButtonText: '确定',
  2358. cancelButtonText: '取消',
  2359. type: 'warning',
  2360. }
  2361. ).then(() => {
  2362. let tempData = {
  2363. submitList: this.inboundDetailSelection,
  2364. }
  2365. deleteInboundDetail(tempData).then(({ data }) => {
  2366. if (data && data.code === 0) {
  2367. this.getInboundDetail()
  2368. this.inboundDetailSelection = []
  2369. this.$message.success('操作成功')
  2370. } else {
  2371. this.$message.error(data.msg)
  2372. }
  2373. })
  2374. })
  2375. },
  2376. // 批量编辑模态框
  2377. editBatchModel() {
  2378. if (this.currentRow.orderType === '采购入库') {
  2379. this.$message.warning('采购入库单据不能编辑!')
  2380. return
  2381. }
  2382. if (this.editBatchVisible) {
  2383. this.editBatchVisible = false
  2384. } else {
  2385. this.editBatchVisible = true
  2386. }
  2387. },
  2388. // 批量保存
  2389. batchModel() {
  2390. let params = []
  2391. params = this.detailList
  2392. this.saveLoading = true
  2393. updateInboundDetail(params)
  2394. .then(({ data }) => {
  2395. if (data && data.code === 0) {
  2396. this.getInboundDetail()
  2397. this.$message.success(data.msg)
  2398. this.editBatchVisible = false
  2399. } else {
  2400. this.$message.error(data.msg)
  2401. }
  2402. })
  2403. .finally(() => {
  2404. this.saveLoading = false
  2405. })
  2406. },
  2407. // 入库明细
  2408. inboundDetailModal(row) {
  2409. getInboundDetail2(row).then(({ data }) => {
  2410. if (data && data.code === 0) {
  2411. this.detailList2 = data.rows
  2412. } else {
  2413. this.detailList2 = []
  2414. }
  2415. })
  2416. this.detailModal2 = true
  2417. },
  2418. // 库位输入校验
  2419. supplierBlur(tagNo) {
  2420. let tempData = {
  2421. tagno: tagNo,
  2422. conditionSql:
  2423. " and SupplierID = '" +
  2424. this.modalData.supplierId +
  2425. "'" +
  2426. " and site = '" +
  2427. this.modalData.site +
  2428. "'",
  2429. }
  2430. getChooselist(tempData).then(({ data }) => {
  2431. if (data && data.code === 0) {
  2432. if (data.baseListData.length > 0) {
  2433. this.modalData.supplierId = data.baseListData[0].SupplierID
  2434. this.modalData.supplierName = data.baseListData[0].SupplierName
  2435. } else {
  2436. this.modalData.supplierName = ''
  2437. }
  2438. }
  2439. })
  2440. },
  2441. chooseWareHouse(row) {
  2442. this.tempWareHouseRow = row
  2443. this.getBaseList(20)
  2444. },
  2445. saveMaterialDetail() {
  2446. for (let i = 0; i < this.sobomList.length; i++) {
  2447. this.sobomList[i].notifyNo = this.currentRow.notifyNo
  2448. this.sobomList[i].site = this.$store.state.user.site
  2449. this.sobomList[i].bomItemNo =
  2450. this.sobomList[i].lineItemNo || this.sobomList[i].bomItemNo
  2451. }
  2452. let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
  2453. if (materialList.length == 0) {
  2454. this.$alert('没有需要保存的内容!', '提示', {
  2455. confirmButtonText: '确定',
  2456. })
  2457. return false
  2458. }
  2459. console.log('this.sobomList', materialList)
  2460. saveShipmentMaterialDetail(materialList).then(({ data }) => {
  2461. if (data.code === 0) {
  2462. this.materialModalFlag = false
  2463. this.$message.success('操作成功')
  2464. } else {
  2465. this.$alert(data.msg, '错误', {
  2466. confirmButtonText: '确定',
  2467. })
  2468. }
  2469. })
  2470. },
  2471. // 获取基础数据列表S
  2472. getBaseList(val, type) {
  2473. this.tagNo = val
  2474. this.tagType = type
  2475. this.$nextTick(() => {
  2476. let strVal = ''
  2477. if (val === 506) {
  2478. strVal = this.modalData.supplierId
  2479. this.$refs.baseList.init(val, strVal)
  2480. }
  2481. if (val === 20) {
  2482. strVal = this.tempWareHouseRow.inWarehouse
  2483. this.$refs.baseList.init(val, strVal)
  2484. }
  2485. })
  2486. },
  2487. // 列表方法的回调
  2488. getBaseData(val) {
  2489. if (this.tagNo === 506) {
  2490. this.modalData.supplierId = val.SupplierID
  2491. this.modalData.supplierName = val.SupplierName
  2492. }
  2493. if (this.tagNo === 20) {
  2494. this.tempWareHouseRow.inWarehouse = val.WareHouseID
  2495. this.tempWareHouseRow.inWarehouseName = val.WareHouseName
  2496. console.log(this.tempWareHouseRow)
  2497. }
  2498. },
  2499. async exportExcel() {
  2500. this.searchData.limit = -1
  2501. this.searchData.page = 1
  2502. excel.exportTable({
  2503. url: '/inbound/searchInboundNotification',
  2504. columnMapping: this.columnList, //可以直接用table,不需要的列就剔除
  2505. mergeSetting: [], //需要合并的列
  2506. params: this.searchData,
  2507. fileName: this.exportName + '.xlsx',
  2508. rowFetcher: (res) => res.data,
  2509. columnFormatter: [],
  2510. dropColumns: [],
  2511. })
  2512. },
  2513. // 动态列开始 获取 用户保存的 格式列
  2514. async getTableUserColumn(tableId, columnId) {
  2515. let queryTableUser = {
  2516. userId: this.$store.state.user.name,
  2517. functionId: this.$route.meta.menuId,
  2518. tableId: tableId,
  2519. status: true,
  2520. languageCode: this.$i18n.locale,
  2521. }
  2522. await getTableUserListLanguage(queryTableUser).then(({ data }) => {
  2523. if (data.rows.length > 0) {
  2524. switch (columnId) {
  2525. case 1:
  2526. this.columnList = data.rows
  2527. break
  2528. }
  2529. } else {
  2530. this.getColumnList(tableId, columnId)
  2531. }
  2532. })
  2533. },
  2534. enterSOSDetail(row) {
  2535. let rows = {
  2536. site: this.$store.state.user.site,
  2537. notifyNo: this.currentRow.notifyNo,
  2538. soorderNo: row.soorderNo,
  2539. seqNo: row.seqNo,
  2540. partNo: row.fgpartNo,
  2541. itemNo: row.itemNo,
  2542. }
  2543. this.searchUnissueNotifyMaterialList(rows)
  2544. },
  2545. searchUnissueNotifyMaterialList(row){
  2546. this.bomLoadFlag = true
  2547. this.materialModalFlag = true
  2548. searchUnissueNotifyMaterialList(row).then(({ data }) => {
  2549. if (data.code === 0) {
  2550. this.sobomList = data.rows
  2551. }
  2552. }).finally(() => {
  2553. this.bomLoadFlag = false
  2554. })
  2555. },
  2556. // 删除
  2557. deleteNotifySOS(row) {
  2558. this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
  2559. confirmButtonText: '确定',
  2560. cancelButtonText: '取消',
  2561. type: 'warning',
  2562. })
  2563. .then(() => {
  2564. deleteNotifyUnissue(row).then(({ data }) => {
  2565. if (data && data.code === 0) {
  2566. this.getNotifyNoDetail()
  2567. this.$message({
  2568. message: '操作成功',
  2569. type: 'success',
  2570. duration: 1500,
  2571. onClose: () => {},
  2572. })
  2573. } else {
  2574. this.$alert(data.msg, '错误', {
  2575. confirmButtonText: '确定',
  2576. })
  2577. }
  2578. })
  2579. })
  2580. .catch(() => {})
  2581. },
  2582. // 获取 tableDefault 列
  2583. async getColumnList(tableId, columnId) {
  2584. let queryTable = {
  2585. functionId: this.$route.meta.menuId,
  2586. tableId: tableId,
  2587. languageCode: this.$i18n.locale,
  2588. }
  2589. await getTableDefaultListLanguage(queryTable).then(({ data }) => {
  2590. if (data.rows.length !== 0) {
  2591. switch (columnId) {
  2592. case 1:
  2593. this.columnList = data.rows
  2594. break
  2595. }
  2596. }
  2597. })
  2598. },
  2599. //获取按钮的权限数据
  2600. getButtonAuthData() {
  2601. if (this.$store.state.user.id === 1) {
  2602. return
  2603. }
  2604. let searchFlag = this.isAuth(this.menuId + ':search')
  2605. let saveFlag = this.isAuth(this.menuId + ':save')
  2606. let updateFlag = this.isAuth(this.menuId + ':update')
  2607. let deleteFlag = this.isAuth(this.menuId + ':delete')
  2608. let archiveFlag = this.isAuth(this.menuId + ':archive')
  2609. let closeFlag = this.isAuth(this.menuId + ':close')
  2610. let issueFlag = this.isAuth(this.menuId + ':issue')
  2611. //处理页面的权限数据
  2612. this.authSearch = !searchFlag
  2613. this.authSave = !saveFlag
  2614. this.authUpdate = !updateFlag
  2615. this.authDelete = !deleteFlag
  2616. this.authArchive = !archiveFlag
  2617. this.authClose = !closeFlag
  2618. this.authIssue = !issueFlag
  2619. },
  2620. /**
  2621. * @Description 取消下达处理方法 - rqrq
  2622. * @param row 当前行数据
  2623. */
  2624. cancelIssueShipmentHandle(row) {
  2625. // 先判断发起人是否有未下达的shipment申请单 - rqrq
  2626. let checkData = {
  2627. site: row.site,
  2628. username: row.username
  2629. }
  2630. checkUserHasUnissueShipment(checkData).then(({ data }) => {
  2631. if (data && data.code === 0) {
  2632. // 如果有未下达的申请单 - rqrq
  2633. if (data.row != null) {
  2634. this.$alert('该用户有未下达的申请单,请先处理', '提示', {
  2635. confirmButtonText: '确定'
  2636. })
  2637. return
  2638. }
  2639. // 没有未下达的申请单,执行取消下达 - rqrq
  2640. this.$confirm(`确定取消下达发货申请单【${row.notifyNo}】吗?`, '提示', {
  2641. confirmButtonText: '确定',
  2642. cancelButtonText: '取消',
  2643. type: 'warning'
  2644. }).then(() => {
  2645. let cancelData = {
  2646. site: row.site,
  2647. notifyNo: row.notifyNo
  2648. }
  2649. cancelIssueShipment(cancelData).then(({ data }) => {
  2650. if (data && data.code === 0) {
  2651. this.$message.success('取消下达成功')
  2652. // 重新加载数据 - rqrq
  2653. this.getDataList()
  2654. } else {
  2655. this.$alert(data.msg, '错误', {
  2656. confirmButtonText: '确定'
  2657. })
  2658. }
  2659. }).catch(() => {
  2660. this.$message.error('取消下达失败')
  2661. })
  2662. }).catch(() => {
  2663. // 用户取消操作 - rqrq
  2664. })
  2665. } else {
  2666. this.$alert(data.msg, '错误', {
  2667. confirmButtonText: '确定'
  2668. })
  2669. }
  2670. }).catch(() => {
  2671. this.$message.error('检查用户申请单失败')
  2672. })
  2673. },
  2674. /**
  2675. * @Description 预览库存发货通知单只考虑立库 - rqrq
  2676. * @param row 当前申请单行数据
  2677. */
  2678. previewInventory(row) {
  2679. this.currentNotifyRow = row
  2680. this.previewDialogVisible = true
  2681. this.previewLoading = true
  2682. this.previewData = []
  2683. let inData = {
  2684. site: row.site,
  2685. notifyNo: row.notifyNo
  2686. }
  2687. checkShipmentInventory(inData).then(({data}) => {
  2688. this.previewLoading = false
  2689. if (data && data.code === 0) {
  2690. this.previewData = data.rows || []
  2691. } else {
  2692. this.$alert(data.msg, '错误', {
  2693. confirmButtonText: '确定'
  2694. })
  2695. }
  2696. }).catch(() => {
  2697. this.previewLoading = false
  2698. this.$message.error('获取库存预览失败')
  2699. })
  2700. },
  2701. /**
  2702. * @Description 推送至WCS发货通知单 - rqrq
  2703. */
  2704. pushToWcs() {
  2705. if (!this.previewData || this.previewData.length === 0) {
  2706. this.$message.warning('没有可推送的数据')
  2707. return
  2708. }
  2709. // 检查是否有满足条件的数据(orderSatisfactionStatus === 1,绿色) - rqrq
  2710. const validData = this.previewData.filter(item => item.orderSatisfactionStatus === 1)
  2711. if (validData.length === 0) {
  2712. this.$message.warning('没有满足库存要求的订单,无法推送')
  2713. return
  2714. }
  2715. this.$confirm('确认推送至WCS?', '提示', {
  2716. confirmButtonText: '确定',
  2717. cancelButtonText: '取消',
  2718. type: 'warning'
  2719. }).then(() => {
  2720. this.pushLoading = true
  2721. let pushData = {
  2722. site: this.currentNotifyRow.site,
  2723. notifyNo: this.currentNotifyRow.notifyNo,
  2724. shipmentInventoryList: this.previewData
  2725. }
  2726. pushShipmentInventoryToWcs(pushData).then(({data}) => {
  2727. if (data && data.code === 0) {
  2728. this.$message({
  2729. message: '推送WCS成功',
  2730. type: 'success',
  2731. duration: 1500
  2732. })
  2733. this.previewDialogVisible = false
  2734. this.getDataList() // 刷新列表
  2735. } else {
  2736. this.$alert(data.msg, '错误', {
  2737. confirmButtonText: '确定'
  2738. })
  2739. }
  2740. }).catch(() => {
  2741. this.$message.error('推送WCS失败')
  2742. }).finally(() => {
  2743. this.pushLoading = false
  2744. })
  2745. }).catch(() => {
  2746. // 用户取消 - rqrq
  2747. })
  2748. },
  2749. /**
  2750. * @Description 表格行样式发货通知单绿色=满足红色=不满足 - rqrq
  2751. */
  2752. getRowStyle({ row }) {
  2753. if (row.orderSatisfactionStatus === 1) {
  2754. return { backgroundColor: '#67C23A20' } // 绿色背景
  2755. } else if (row.orderSatisfactionStatus === 3) {
  2756. return { backgroundColor: '#F56C6C20' } // 红色背景
  2757. }
  2758. return {}
  2759. },
  2760. },
  2761. }
  2762. </script>
  2763. <style scoped>
  2764. /deep/ .customer-tab .el-tabs__content {
  2765. padding: 5px !important;
  2766. }
  2767. .el-table /deep/ .cell {
  2768. height: auto;
  2769. line-height: 1.5;
  2770. }
  2771. /* rqrq - 匹配条码列自动换行显示 */
  2772. /deep/ .wrap-text-column .cell {
  2773. white-space: normal !important;
  2774. word-break: break-all !important;
  2775. line-height: 1.5 !important;
  2776. }
  2777. </style>