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.

3606 lines
119 KiB

9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 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-button type="success" icon="el-icon-printer" @click="openShipmentLineQueryDialog">打印</el-button>
  40. </el-form-item>
  41. </el-form>
  42. <!-- 展示列表 -->
  43. <el-table :height="height" :data="dataList" border v-loading="searchLoading" ref="inboundTable"
  44. :row-style="rowStyle" @row-click="inboundClickRow" @current-change="changeCurrentRow"
  45. style="width: 100%;">
  46. <el-table-column type="selection" header-align="center" align="center" width="50">
  47. </el-table-column>
  48. <el-table-column v-for="(item,index) in columnList" :key="index" :sortable="item.columnSortable"
  49. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  50. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  51. :label="item.columnLabel">
  52. <template slot-scope="scope">
  53. <span v-if="!item.columnHidden">
  54. <span v-if="item.columnProp === 'transportFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
  55. {{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
  56. </span>
  57. <span v-else>{{ scope.row[item.columnProp] }}</span>
  58. </span>
  59. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  60. style="width: 100px; height: 80px" /></span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column fixed="right" header-align="center" align="center" width="250" label="操作">
  64. <template slot-scope="scope">
  65. <!-- <template v-if="!authUpdate">
  66. <el-link
  67. v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '待检验' || scope.row.orderStatus === '编辑中'"
  68. style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
  69. </template> -->
  70. <template v-if="!authClose">
  71. <el-link style="cursor: pointer"
  72. @click="closeModal(scope.row)">关闭</el-link>
  73. </template>
  74. <!-- rqrq - 推送WCS按钮只在状态为ISSUE且未推送完成时显示 -->
  75. <el-link v-if="scope.row.pushWcsFlag!=='出库完成'&&scope.row.status==='ISSUE' && scope.row.pushWcsFlag!=='推送完成'"
  76. style="cursor: pointer; margin-left: 10px;"
  77. @click="previewInventory(scope.row)">推送WCS</el-link>
  78. <!-- rqrq - 取消下达按钮只在状态为ISSUE且未推送WCS时显示 -->
  79. <el-link v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'"
  80. style="cursor: pointer; margin-left: 10px;"
  81. @click="cancelIssueShipmentHandle(scope.row)">取消下达</el-link>
  82. <!-- <template v-if="!authIssue">
  83. <el-link v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '编辑中'" style="cursor: pointer"
  84. @click="issueModal(scope.row)">下达</el-link>
  85. </template> -->
  86. </template>
  87. </el-table-column>
  88. </el-table>
  89. <!-- 分页栏 -->
  90. <el-pagination style="margin-top: 0px" @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
  91. :current-page="pageIndex" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize" :total="totalPage"
  92. layout="total, sizes, prev, pager, next, jumper">
  93. </el-pagination>
  94. <!-- 收货入库通知新增/修改 -->
  95. <el-dialog title="收货入库通知" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="525px">
  96. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"
  97. style="margin-left: 7px;margin-top: -5px;">
  98. <el-form-item label="单据类型" prop="orderType">
  99. <el-select v-model="modalData.orderType" :disabled="modalDisableFlag" style="width: 100px">
  100. <el-option label="生产退料" value="生产退料"></el-option>
  101. <el-option label="生产入库" value="生产入库"></el-option>
  102. <el-option label="其他入库" value="其他入库"></el-option>
  103. </el-select>
  104. </el-form-item>
  105. <el-form-item label="要求入库日期" prop="requiredInboundDate">
  106. <el-date-picker style="width: 120px" v-model="modalData.requiredInboundDate" type="date"
  107. value-format="yyyy-MM-dd">
  108. </el-date-picker>
  109. </el-form-item>
  110. </el-form>
  111. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  112. <el-form-item>
  113. <!-- <span v-if="modalDisableFlag" slot="label">供应商</span>-->
  114. <span style="cursor: pointer" slot="label" @click="getBaseList(506)"><a href="#">供应商</a></span>
  115. <el-input v-model="modalData.supplierId" @change="supplierBlur(506)" style="width: 100px"></el-input>
  116. <el-input v-model="modalData.supplierName" disabled style="width: 380px"></el-input>
  117. </el-form-item>
  118. </el-form>
  119. <el-form :inline="true" label-position="top" style="margin-left: 7px">
  120. <el-form-item :label="'备注'">
  121. <el-input type="textarea" v-model="modalData.remarks" :rows="3" resize='none' show-word-limit
  122. style="width: 485px;height: 20px"></el-input>
  123. </el-form-item>
  124. </el-form>
  125. <el-footer style="height:35px;margin-top: 55px;text-align:center">
  126. <el-button type="primary" :loading="saveLoading" @click="saveData()">保存</el-button>
  127. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  128. </el-footer>
  129. </el-dialog>
  130. <!-- 页签 -->
  131. <el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card"
  132. @tab-click="tabClick" class="customer-tab">
  133. <el-tab-pane label="已申请SHIPMENT" name="inboundDetail">
  134. <!-- <el-form label-position="top" style="margin-left: 2px;">
  135. <el-button type="primary" @click="deleteInboundDetail()" icon="el-icon-delete">删除</el-button>
  136. </el-form> -->
  137. <el-table :data="detailList" :height="secondHeight - 68" border @selection-change="selectionInboundDetail"
  138. @row-dblclick="handleShipmentRowDblClick"
  139. v-loading="searchLoading" style="width: 100%;">
  140. <!-- <el-table-column type="selection" header-align="center" align="center" width="50">
  141. </el-table-column> -->
  142. <el-table-column v-for="(item,index) in columnDetailList" :key="index" :sortable="item.columnSortable"
  143. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  144. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  145. :label="item.columnLabel">
  146. <template slot-scope="scope">
  147. <span v-if="!item.columnHidden">
  148. <span v-if="item.columnProp === 'pushWmsFlag' || item.columnProp === 'transportFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
  149. {{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
  150. </span>
  151. <span v-else>{{scope.row[item.columnProp]}}</span>
  152. </span>
  153. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  154. style="width: 100px; height: 80px" /></span>
  155. </template>
  156. </el-table-column>
  157. <!-- <el-table-column prop="requiredQty" header-align="center" align="right" min-width="100" label="要求入库数量">
  158. <template slot-scope="scope">
  159. <span v-if="editBatchVisible">
  160. <el-input :controls="false" v-model="scope.row.requiredQty"
  161. @input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
  162. style="height: 11px; width: 98%;">
  163. </el-input>
  164. </span>
  165. <span v-else>
  166. <span>{{scope.row[scope.column.property]}}</span>
  167. </span>
  168. </template>
  169. </el-table-column>
  170. <el-table-column prop="inWarehouseName" header-align="center" align="center" min-width="180" label="入库仓库">
  171. <template slot-scope="scope">
  172. <span v-if="editBatchVisible">
  173. <el-button type="text" @click="chooseWareHouse(scope.row)"
  174. style="width:18%;padding: 3px 7px">选择</el-button>
  175. <el-input v-model="scope.row.inWarehouseName" readonly style="width:77%"></el-input>
  176. </span>
  177. <span v-else>
  178. <span>{{scope.row[scope.column.property]}}</span>
  179. </span>
  180. </template>
  181. </el-table-column>
  182. <el-table-column prop="actualStockInQty" header-align="center" align="right" min-width="100" label="实际入库数量">
  183. </el-table-column> -->
  184. <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
  185. <template slot-scope="scope">
  186. <a type="text" size="small" @click="enterSOSDetail(scope.row)">修改</a>
  187. <!-- 不需要删除这里如果删掉了没地方添加只允许关闭申请单重新下 -->
  188. <!-- <a type="text" size="small" @click="deleteNotifySOS(scope.row)" style="margin-left: 10px;">删除</a> -->
  189. </template>
  190. </el-table-column>
  191. </el-table>
  192. </el-tab-pane>
  193. <el-tab-pane label="预留标签清单" name="labelDetail">
  194. <el-table
  195. :data="dataList7"
  196. :height="secondHeight - 68"
  197. border
  198. v-loading="searchLoading"
  199. style="width: 100%;">
  200. <el-table-column
  201. v-for="(item,index) in columnList6" :key="index"
  202. :sortable="item.columnSortable"
  203. :prop="item.columnProp"
  204. :header-align="item.headerAlign"
  205. :show-overflow-tooltip="item.showOverflowTooltip"
  206. :align="item.align"
  207. :fixed="item.fixed==''?false:item.fixed"
  208. :min-width="item.columnWidth"
  209. :label="item.columnLabel">
  210. <template slot-scope="scope">
  211. <span v-if="!item.columnHidden">
  212. <span v-if="item.columnProp === 'outWcsFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
  213. {{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
  214. </span>
  215. <span v-else>{{ scope.row[item.columnProp] }}</span>
  216. </span>
  217. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  218. </template>
  219. </el-table-column>
  220. </el-table>
  221. </el-tab-pane>
  222. <el-tab-pane label="shipmentline打印" name="shipmentLinePrint">
  223. <div v-if="currentShipmentId" style="margin-bottom: 5px; font-size: 12px;">
  224. 当前SHIPMENTID{{ currentShipmentId }}
  225. </div>
  226. <el-table
  227. :data="shipmentLineList"
  228. :height="secondHeight - 68"
  229. border
  230. v-loading="shipmentLineLoading"
  231. style="width: 100%;">
  232. <el-table-column
  233. v-for="(item,index) in columnShipmentLineList" :key="index"
  234. :sortable="item.columnSortable"
  235. :prop="item.columnProp"
  236. :header-align="item.headerAlign"
  237. :show-overflow-tooltip="item.showOverflowTooltip"
  238. :align="item.align"
  239. :fixed="item.fixed==''?false:item.fixed"
  240. :min-width="item.columnWidth"
  241. :label="item.columnLabel">
  242. <template slot-scope="scope">
  243. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  244. </template>
  245. </el-table-column>
  246. <el-table-column fixed="right" header-align="center" align="center" width="80" label="操作">
  247. <template slot-scope="scope">
  248. <el-link
  249. type="primary"
  250. style="cursor: pointer"
  251. :disabled="printLoading"
  252. @click="printShipmentLine(scope.row)"
  253. >打印</el-link>
  254. </template>
  255. </el-table-column>
  256. </el-table>
  257. </el-tab-pane>
  258. </el-tabs>
  259. <!-- 收获入库单明细新增 -->
  260. <el-dialog title="收货入库单明细" :close-on-click-modal="false" v-drag :visible.sync="detailModal" width="900px">
  261. <div style="font-size: 12px">
  262. <el-form :inline="true" label-position="top" :model="detailSearchData">
  263. <el-form-item :label="'物料编码'">
  264. <el-input v-model="detailSearchData.partNo" clearable style="width: 120px"></el-input>
  265. </el-form-item>
  266. <el-form-item :label="'物料名称'">
  267. <el-input v-model="detailSearchData.partDesc" clearable style="width: 120px"></el-input>
  268. </el-form-item>
  269. <template v-if="detailSearchData.orderType === '生产入库'">
  270. <el-form-item :label="'生产订单'">
  271. <el-input v-model="detailSearchData.relatedOrderNo" clearable style="width: 120px"></el-input>
  272. </el-form-item>
  273. <el-form-item :label="'订单状态'">
  274. <el-select v-model="detailSearchData.status" clearable style="width: 100px">
  275. <el-option label="已计划" value="已计划"></el-option>
  276. <el-option label="已下达" value="已下达"></el-option>
  277. <el-option label="已排产" value="已排产"></el-option>
  278. <el-option label="已开工" value="已开工"></el-option>
  279. <el-option label="已取消" value="已取消"></el-option>
  280. <el-option label="已停工" value="已停工"></el-option>
  281. <el-option label="已关闭" value="已关闭"></el-option>
  282. </el-select>
  283. </el-form-item>
  284. </template>
  285. <el-form-item label=" ">
  286. <el-button type="primary" @click="searchTypeChange">查询</el-button>
  287. </el-form-item>
  288. </el-form>
  289. </div>
  290. <el-container v-if="detailSearchData.orderType === '其他入库'">
  291. <el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
  292. <span style="font-size: 12px">可选物料</span>
  293. <el-table height="200px" :data="partList1" border ref="partTable1" @selection-change="selectionPart1"
  294. highlight-current-row style="width: 100%">
  295. <el-table-column type="selection" header-align="center" align="center" width="50">
  296. </el-table-column>
  297. <el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
  298. </el-table-column>
  299. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" label="物料名称">
  300. </el-table-column>
  301. <el-table-column prop="unit" header-align="center" align="left" min-width="120" label="物料单位">
  302. </el-table-column>
  303. </el-table>
  304. <!-- 分页-->
  305. <el-pagination style="margin-top: 5px" @size-change="sizeChangeHandle2" @current-change="currentChangeHandle2"
  306. :current-page="pageIndex2" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize2" :total="totalPage2"
  307. layout="total, sizes, prev, pager, next, jumper">
  308. </el-pagination>
  309. </el-header>
  310. <el-main style="width: 880px;height: 27px;margin-top: 70px;padding: 0 0 0 0;text-align:center">
  311. <div>
  312. <el-button type="primary" @click="addPart">添加>></el-button>
  313. <el-button type="primary" @click="deletePart">删除&lt;&lt;</el-button>
  314. </div>
  315. </el-main>
  316. <el-footer style="width: 880px;height: 200px;padding: 0 0 0 0;">
  317. <span style="font-size: 12px">已选物料</span>
  318. <div class="rq">
  319. <el-table height="200px" :data="partList2" border ref="partTable2" @selection-change="selectionPart2"
  320. highlight-current-row style="width: 100%">
  321. <el-table-column type="selection" header-align="center" align="center" width="50">
  322. </el-table-column>
  323. <el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
  324. </el-table-column>
  325. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" label="物料名称">
  326. </el-table-column>
  327. <el-table-column prop="" header-align="center" align="center" min-width="100" label="要求入库数量">
  328. <template slot-scope="scope">
  329. <el-input :controls="false" v-model="scope.row.requiredQty"
  330. @input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
  331. style="height: 11px; width: 98%;">
  332. </el-input>
  333. </template>
  334. </el-table-column>
  335. </el-table>
  336. </div>
  337. </el-footer>
  338. </el-container>
  339. <el-container v-else-if="detailSearchData.orderType === '生产入库'">
  340. <el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
  341. <span style="font-size: 12px">可选物料</span>
  342. <el-table height="200px" :data="partList1" border ref="partTable1" @selection-change="selectionPart1"
  343. highlight-current-row style="width: 100%">
  344. <el-table-column type="selection" header-align="center" align="center" width="50">
  345. </el-table-column>
  346. <el-table-column prop="relatedOrderNo" header-align="center" align="left" min-width="100" label="生产订单">
  347. </el-table-column>
  348. <el-table-column prop="partNo" header-align="center" align="left" min-width="100" label="物料编码">
  349. </el-table-column>
  350. <el-table-column prop="partDesc" header-align="center" align="left" min-width="200" label="物料名称">
  351. </el-table-column>
  352. <el-table-column prop="unit" header-align="center" align="left" min-width="80" label="物料单位">
  353. </el-table-column>
  354. <el-table-column prop="orderQty" header-align="center" align="right" min-width="80" label="订单数量">
  355. </el-table-column>
  356. <el-table-column prop="requiredQty" header-align="center" align="right" min-width="80" label="可入库数">
  357. </el-table-column>
  358. <el-table-column prop="countRollNo" header-align="center" align="right" min-width="80" label="可入库卷数">
  359. </el-table-column>
  360. </el-table>
  361. <!-- 分页-->
  362. <el-pagination style="margin-top: 5px" @size-change="sizeChangeHandle2" @current-change="currentChangeHandle2"
  363. :current-page="pageIndex2" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize2" :total="totalPage2"
  364. layout="total, sizes, prev, pager, next, jumper">
  365. </el-pagination>
  366. </el-header>
  367. <el-main style="width: 880px;height: 27px;margin-top: 70px;padding: 0 0 0 0;text-align:center">
  368. <div>
  369. <el-button type="primary" @click="addPart">添加>></el-button>
  370. <el-button type="primary" @click="deletePart">删除&lt;&lt;</el-button>
  371. </div>
  372. </el-main>
  373. <el-footer style="width: 880px;height: 200px;padding: 0 0 0 0;">
  374. <span style="font-size: 12px">已选物料</span>
  375. <div class="rq">
  376. <el-table height="200px" :data="partList2" border ref="partTable2" @selection-change="selectionPart2"
  377. highlight-current-row style="width: 100%">
  378. <el-table-column type="selection" header-align="center" align="center" width="50">
  379. </el-table-column>
  380. <el-table-column prop="relatedOrderNo" header-align="center" align="center" min-width="80" label="生产订单">
  381. </el-table-column>
  382. <el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
  383. </el-table-column>
  384. <el-table-column prop="partDesc" header-align="center" align="left" min-width="150" label="物料名称">
  385. </el-table-column>
  386. <el-table-column prop="" header-align="center" align="center" min-width="100" label="要求入库数量">
  387. <template slot-scope="scope">
  388. <el-input :controls="false" v-model="scope.row.requiredQty"
  389. @input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
  390. style="height: 11px; width: 98%;">
  391. </el-input>
  392. </template>
  393. </el-table-column>
  394. </el-table>
  395. </div>
  396. </el-footer>
  397. </el-container>
  398. <el-footer style="height:30px;margin-top: 35px;text-align:center">
  399. <el-button type="primary" :loading="saveLoading" @click="saveInboundDetail">保存</el-button>
  400. <el-button type="primary" @click="detailModal = false">关闭</el-button>
  401. </el-footer>
  402. </el-dialog>
  403. <el-dialog title="选择工单" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1000px">
  404. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  405. <el-row :gutter="20">
  406. <el-col :span="4">
  407. <el-form-item :label="'生产订单'">
  408. <el-input v-model="seqNoData.orderno"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="4">
  412. <el-form-item>
  413. <span slot="label" style="" @click="getBaseList(515)"><a herf="#">机台</a></span>
  414. <el-input v-model="seqNoData.sResourceid"></el-input>
  415. </el-form-item>
  416. </el-col>
  417. <el-col :span="4">
  418. <el-form-item>
  419. <span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span>
  420. <el-input v-model="seqNoData.sWorkcenterno"></el-input>
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="4">
  424. <el-form-item :label="'派工日期'">
  425. <el-date-picker style="width: 100%" v-model="seqNoData.startDate" type="date" value-format="yyyy-MM-dd"
  426. placeholder="选择日期">
  427. </el-date-picker>
  428. </el-form-item>
  429. </el-col>
  430. <el-col :span="4">
  431. <el-form-item :label="'到'">
  432. <el-date-picker style="width: 100%" v-model="seqNoData.endDate" type="date" value-format="yyyy-MM-dd"
  433. placeholder="选择日期">
  434. </el-date-picker>
  435. </el-form-item>
  436. </el-col>
  437. </el-row>
  438. <el-row :gutter="20">
  439. <el-col :span="6">
  440. <el-form-item>
  441. <el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="">查询</el-button>
  442. </el-form-item>
  443. </el-col>
  444. </el-row>
  445. </el-form>
  446. <el-table :height="400" :data="seqNoList" border style="width: 100%;">
  447. <el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
  448. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  449. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  450. :label="item.columnLabel">
  451. <template slot-scope="scope">
  452. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  453. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  454. style="width: 100px; height: 80px" /></span>
  455. </template>
  456. </el-table-column>
  457. <el-table-column fixed="left" header-align="center" align="center" width="60" label="操作">
  458. <template slot-scope="scope">
  459. <a type="text" size="small" @click="chooseSOS(scope.row)">选择</a>
  460. </template>
  461. </el-table-column>
  462. </el-table>
  463. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  464. <el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button>
  465. </el-footer>
  466. </el-dialog>
  467. <el-dialog title="保存工单" :close-on-click-modal="false" v-drag :visible.sync="saveSeqNoModalFlag" width="750px">
  468. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  469. <el-row :gutter="20">
  470. <el-col :span="6">
  471. <el-form-item :label="'生产订单'">
  472. <el-input v-model="notifyOrderData.orderNo" disabled></el-input>
  473. </el-form-item>
  474. </el-col>
  475. <el-col :span="6">
  476. <el-form-item :label="'机台'">
  477. <el-input v-model="notifyOrderData.sResourceID" disabled></el-input>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="6">
  481. <el-form-item :label="'工单数量'">
  482. <el-input v-model="notifyOrderData.qtyRequired" disabled></el-input>
  483. </el-form-item>
  484. </el-col>
  485. </el-row>
  486. <el-row :gutter="20">
  487. <el-col :span="6">
  488. <el-form-item :label="'物料'">
  489. <el-input v-model="notifyOrderData.partNo" disabled></el-input>
  490. </el-form-item>
  491. </el-col>
  492. <el-col :span="12">
  493. <el-form-item :label="'物料名称'">
  494. <el-input v-model="notifyOrderData.partDesc" disabled style="width: 204%" ></el-input>
  495. </el-form-item>
  496. </el-col>
  497. </el-row>
  498. <el-row :gutter="20">
  499. <el-col :span="6">
  500. <el-form-item :label="'要求发料时间'">
  501. <el-date-picker style="width: 100%" v-model="notifyOrderData.needDate" type="datetime"
  502. value-format="yyyy-MM-dd HH:mm" placeholder="选择日期">
  503. </el-date-picker>
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="6">
  507. <el-form-item label="机台">
  508. <el-input v-model="notifyOrderData.locationNo" disabled></el-input>
  509. </el-form-item>
  510. </el-col>
  511. <el-col :span="6">
  512. <el-form-item :label="'此次领料数量'">
  513. <el-input-number v-model="notifyOrderData.issureQty" style="padding: 0px;width: 100%" :controls="false"
  514. :step="0" :min="0" class="text-right"></el-input-number>
  515. </el-form-item>
  516. </el-col>
  517. <el-col :span="6">
  518. <el-form-item :label="' '">
  519. <el-button type="primary" @click="qtyAllForSeqNo()" style="margin-top: 4%;">全数领料</el-button>
  520. </el-form-item>
  521. </el-col>
  522. </el-row>
  523. </el-form>
  524. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  525. <el-button type="primary" @click="saveSOS()">保存</el-button>
  526. <el-button type="primary" @click="saveSeqNoModalFlag=false">关闭</el-button>
  527. </el-footer>
  528. </el-dialog>
  529. <!-- 入库明细 -->
  530. <el-dialog title="入库明细" :close-on-click-modal="false" v-drag :visible.sync="detailModal2" width="900px">
  531. <el-table height="400px" :data="detailList2" border style="width: 100%;">
  532. <el-table-column v-for="(item,index) in columnDetailList2" :key="index" :sortable="item.columnSortable"
  533. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  534. :align="item.align" :fixed="item.fixed===''?false:item.fixed" :min-width="item.columnWidth"
  535. :label="item.columnLabel">
  536. </el-table-column>
  537. </el-table>
  538. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  539. <el-button type="primary" @click="detailModal2 = false">关闭</el-button>
  540. </el-footer>
  541. </el-dialog>
  542. <el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="900px">
  543. <!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  544. <el-row :gutter="20">
  545. <el-col :span="6">
  546. <el-form-item :label="'生产订单号'">
  547. <el-input v-model="sobomData.orderNo" disabled></el-input>
  548. </el-form-item>
  549. </el-col>
  550. <el-col :span="6">
  551. <el-form-item :label="'产品编码'">
  552. <el-input v-model="sobomData.partNo" disabled></el-input>
  553. </el-form-item>
  554. </el-col>
  555. </el-row>
  556. </el-form> -->
  557. <div class="yzzTable">
  558. <el-table :height="400" :data="sobomList" border style="width: 100%;" v-loading="bomLoadFlag">
  559. <el-table-column v-for="(item,index) in columnList3" :key="index" :sortable="item.columnSortable"
  560. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  561. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  562. :label="item.columnLabel">
  563. <template slot-scope="scope">
  564. <div v-if="item.columnProp === 'qtyToIssue'">
  565. <el-input v-model="scope.row.qtyToIssue" style="height: 11px; width: 98%;" :step="0" :min="0"></el-input>
  566. </div>
  567. <div v-else-if="item.columnProp === 'remark'">
  568. <el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
  569. </div>
  570. <!-- rqrq - 可用库存特殊显示加粗小于可发数量时红色 -->
  571. <div v-else-if="item.columnProp === 'availableQty'">
  572. <span :style="{fontWeight: 'bold', color: (scope.row.availableQty < scope.row.qtyOnHand) ? '#F56C6C' : ''}">
  573. {{ scope.row.availableQty }}
  574. </span>
  575. </div>
  576. <div v-else>
  577. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  578. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  579. style="width: 100px; height: 80px" /></span>
  580. </div>
  581. </template>
  582. </el-table-column>
  583. </el-table>
  584. </div>
  585. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  586. <el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
  587. <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
  588. </el-footer>
  589. </el-dialog>
  590. <!-- rqrq - 库存预览弹窗发货通知单只有绿色和红色 -->
  591. <el-dialog
  592. title="库存预览"
  593. :close-on-click-modal="false"
  594. v-drag
  595. :visible.sync="previewDialogVisible"
  596. width="90%">
  597. <div v-loading="previewLoading">
  598. <el-table
  599. :data="previewData"
  600. height="400"
  601. border
  602. :row-style="getRowStyle"
  603. highlight-current-row
  604. style="width: 100%">
  605. <el-table-column prop="partNo" label="物料编号" sortable min-width="80"></el-table-column>
  606. <el-table-column prop="requiredQty" label="需求数量" min-width="80" align="right"></el-table-column>
  607. <el-table-column prop="productionOrderNo" label="发货单" sortable min-width="100"></el-table-column>
  608. <el-table-column prop="bomLineNo" label="行号" min-width="60"></el-table-column>
  609. <el-table-column label="是否满足" sortable min-width="80" align="center">
  610. <template slot-scope="scope">
  611. <span :style="{color: scope.row.isWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
  612. {{ scope.row.isWarehouseSatisfied === 'Y' ? '满足' : '不满足' }}
  613. </span>
  614. </template>
  615. </el-table-column>
  616. <el-table-column prop="matchedBarcodes" label="匹配条码" min-width="500" align="left" class-name="wrap-text-column">
  617. <template slot-scope="scope">
  618. <div style="white-space: normal; word-break: break-all; line-height: 1.5;">
  619. {{ scope.row.matchedBarcodes }}
  620. </div>
  621. </template>
  622. </el-table-column>
  623. </el-table>
  624. </div>
  625. <div slot="footer" class="dialog-footer">
  626. <el-button type="primary" @click="pushToWcs" :disabled="pushLoading">
  627. {{ pushLoading ? '推送中...' : '推送至WCS' }}
  628. </el-button>
  629. <el-button @click="previewDialogVisible = false" :disabled="pushLoading">关闭</el-button>
  630. </div>
  631. </el-dialog>
  632. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  633. <!-- 通过输入SHIPMENT查询ShipmentLine并打印 -->
  634. <el-dialog
  635. title="ShipmentLine打印"
  636. :visible.sync="shipmentLineQueryDialogVisible"
  637. width="90%"
  638. :close-on-click-modal="false"
  639. @close="resetShipmentLineQueryDialog"
  640. >
  641. <el-form :inline="true" size="small" @submit.native.prevent>
  642. <el-form-item label="SHIPMENT">
  643. <el-input
  644. v-model="dialogShipmentId"
  645. clearable
  646. placeholder="请输入SHIPMENT"
  647. style="width: 220px"
  648. @keyup.enter.native="searchShipmentLineByDialog"
  649. />
  650. </el-form-item>
  651. <el-form-item>
  652. <el-button type="primary" :loading="shipmentLineLoading" @click="searchShipmentLineByDialog">查询</el-button>
  653. </el-form-item>
  654. </el-form>
  655. <div v-if="currentShipmentId" style="margin-bottom: 8px; font-size: 12px;">
  656. 当前SHIPMENTID{{ currentShipmentId }}
  657. </div>
  658. <el-table
  659. :data="shipmentLineList"
  660. height="420"
  661. border
  662. v-loading="shipmentLineLoading"
  663. style="width: 100%;"
  664. >
  665. <el-table-column
  666. v-for="(item,index) in columnShipmentLineList" :key="index"
  667. :sortable="item.columnSortable"
  668. :prop="item.columnProp"
  669. :header-align="item.headerAlign"
  670. :show-overflow-tooltip="item.showOverflowTooltip"
  671. :align="item.align"
  672. :fixed="item.fixed==''?false:item.fixed"
  673. :min-width="item.columnWidth"
  674. :label="item.columnLabel"
  675. >
  676. <template slot-scope="scope">
  677. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  678. </template>
  679. </el-table-column>
  680. <el-table-column fixed="right" header-align="center" align="center" width="80" label="操作">
  681. <template slot-scope="scope">
  682. <el-link
  683. type="primary"
  684. style="cursor: pointer"
  685. :disabled="printLoading"
  686. @click="printShipmentLine(scope.row)"
  687. >打印</el-link>
  688. </template>
  689. </el-table-column>
  690. </el-table>
  691. </el-dialog>
  692. <!-- shipmentline打印设置标签类型/模板/打印机由后端按 customerId(receiverId) 自动匹配红框部分已注释 -->
  693. <el-dialog
  694. title="标签打印设置"
  695. :visible.sync="shipmentLinePrintDialogVisible"
  696. width="480px"
  697. :close-on-click-modal="false"
  698. append-to-body
  699. @close="resetShipmentLinePrintForm"
  700. >
  701. <el-alert
  702. type="info"
  703. :closable="false"
  704. show-icon
  705. :title="`已选择 1 个标签,请配置打印参数`"
  706. style="margin-bottom: 16px;"
  707. />
  708. <el-form label-position="top" size="small" class="shipment-line-print-form">
  709. <div class="print-qty-row">
  710. <div class="print-qty-item">
  711. <span class="print-qty-label">打印份数</span>
  712. <el-input
  713. v-model="printForm.copies"
  714. :min="1"
  715. :max="99"
  716. controls-position="right"
  717. class="print-input-number"
  718. />
  719. </div>
  720. <div class="print-qty-item">
  721. <span class="print-qty-label">分配数量</span>
  722. <el-input
  723. v-model="printForm.assignQty"
  724. :min="0"
  725. :precision="2"
  726. :step="1"
  727. controls-position="right"
  728. class="print-input-number"
  729. />
  730. </div>
  731. </div>
  732. <div class="form-hint">此数量为打印到标签上的数量</div>
  733. <!-- 红框部分标签类型 / 模板 / 打印机 改为按 receiverId 自动匹配以下注释保留 -->
  734. <!--
  735. <el-form-item label="标签类型">
  736. <el-select
  737. v-model="printForm.labelType"
  738. placeholder="请选择标签类型"
  739. style="width: 100%;"
  740. @change="handlePrintLabelTypeChange"
  741. >
  742. <el-option label="外箱标签" value="外箱标签" />
  743. <el-option label="内箱标签" value="内箱标签" />
  744. </el-select>
  745. </el-form-item>
  746. <el-form-item label="根据物料自动匹配模板">
  747. <el-select
  748. v-model="printForm.reportId"
  749. placeholder="请选择标签模板"
  750. style="width: 100%;"
  751. filterable
  752. @change="handlePrintTemplateChange"
  753. >
  754. <el-option
  755. v-for="item in labelTemplateList"
  756. :key="item.labelNo"
  757. :label="`${item.labelName} (${item.labelNo})`"
  758. :value="item.labelNo"
  759. />
  760. </el-select>
  761. </el-form-item>
  762. <el-form-item :label="`已经探测到 ${printerList.length} 台打印机`">
  763. <el-select
  764. v-model="printForm.printerName"
  765. placeholder="请选择打印机"
  766. style="width: 100%;"
  767. >
  768. <el-option
  769. v-for="item in printerList"
  770. :key="`${item.labelNo}-${item.printerName}`"
  771. :label="`${item.printerName}${item.ipAddress ? ' (' + item.ipAddress + ')' : ''}`"
  772. :value="item.printerName"
  773. />
  774. </el-select>
  775. </el-form-item>
  776. -->
  777. <div class="shipment-line-print-summary">
  778. <div class="summary-item">
  779. <span class="summary-label">打印总数</span>
  780. <span class="summary-value">{{ printForm.copies }} </span>
  781. </div>
  782. <div class="summary-item">
  783. <span class="summary-label">物料数量</span>
  784. <span class="summary-value">1 </span>
  785. </div>
  786. <div class="summary-item">
  787. <span class="summary-label">每标签份数</span>
  788. <span class="summary-value">{{ printForm.copies }} </span>
  789. </div>
  790. </div>
  791. </el-form>
  792. <div slot="footer" class="dialog-footer">
  793. <el-button @click="shipmentLinePrintDialogVisible = false">取消</el-button>
  794. <el-button
  795. type="success"
  796. icon="el-icon-printer"
  797. :loading="printLoading"
  798. :disabled="!canStartShipmentLinePrint"
  799. @click="confirmShipmentLinePrint"
  800. >
  801. 开始打印
  802. </el-button>
  803. </div>
  804. </el-dialog>
  805. </div>
  806. </template>
  807. <script>
  808. import {
  809. getSiteAndBuByUserName,
  810. searchNotifyHeader,
  811. createNotify,
  812. getNotifyNoDetail,
  813. searchNotifyMaterialList,
  814. closeInboundNotification,
  815. checkUserHasUnissueShipment,
  816. cancelIssueShipment,
  817. checkShipmentInventory,
  818. pushShipmentInventoryToWcs,
  819. deleteNotifyUnissue,
  820. saveShipmentMaterialDetail,
  821. searchUnissueNotifyMaterialList,
  822. getShipmentLine,
  823. getShipmentListForIssure
  824. } from '@/api/shipment/shipmentIssue.js'
  825. // rqrq - 导入预留标签清单API
  826. import { searchMaterialListDetail } from '@/api/orderIssure/soIssueNotify.js'
  827. import Chooselist from '@/views/modules/common/Chooselist_eam'
  828. import { getChooselist } from '@/api/chooselist/chooselist.js'
  829. import {
  830. getTableDefaultListLanguage,
  831. getTableUserListLanguage,
  832. } from '@/api/table.js'
  833. import {
  834. // getLabelSettingList, // 打印弹框停用,不再手动选模板
  835. // getUserLabelPrinters, // 打印弹框停用,不再手动选打印机
  836. printLabelCommon,
  837. } from '@/api/labelSetting/label_setting.js'
  838. export default {
  839. components: {
  840. Chooselist,
  841. },
  842. data() {
  843. return {
  844. columnsProp: ['createBy', 'updateBy'],
  845. // 导出 start
  846. exportData: [],
  847. exportName: '收货入库' + this.dayjs().format('YYYYMMDDHHmmss'),
  848. exportHeader: ['收货入库'],
  849. exportFooter: [],
  850. exportList: [],
  851. // 导出 end
  852. tagNo: '',
  853. tagType: '',
  854. searchData: {
  855. site: '',
  856. userName: this.$store.state.user.name,
  857. orderNo: '',
  858. orderType: '',
  859. orderStatus: '',
  860. orderStatusList: [],
  861. pushWcsFlag: '', // rqrq - 新增推送WCS筛选条件
  862. startDate: '',
  863. endDate: '',
  864. page: 1,
  865. limit: 10,
  866. },
  867. detailSearchData: {
  868. site: '',
  869. buNo: '',
  870. orderNo: '',
  871. partNo: '',
  872. partDesc: '',
  873. partNos: '',
  874. orderType: '',
  875. relatedOrderNo: '',
  876. status: '',
  877. page: 1,
  878. limit: 10,
  879. },
  880. height: 200,
  881. secondHeight: 200,
  882. pageIndex: 1,
  883. pageSize: 20,
  884. totalPage: 0,
  885. pageIndex2: 1,
  886. pageSize2: 20,
  887. totalPage2: 0,
  888. modalFlag: false,
  889. modalDisableFlag: false,
  890. notifyOrderData: {
  891. partNo: '',
  892. orderno: '',
  893. itemno: '',
  894. seqno: '',
  895. partDesc: '',
  896. qtyrequired: '',
  897. sResourceid: '',
  898. issureQty: '',
  899. locationNo: '',
  900. needDate: '',
  901. },
  902. modalData: {
  903. site: '',
  904. bu: '',
  905. buNo: '',
  906. flag: '',
  907. orderNo: '',
  908. orderType: '',
  909. orderStatus: '',
  910. requiredInboundDate: '',
  911. supplierId: '',
  912. supplierName: '',
  913. remarks: '',
  914. createdBy: '',
  915. updatedBy: '',
  916. },
  917. seqNoData: {
  918. site: localStorage.getItem('site'),
  919. bu: '',
  920. orderno: '',
  921. seqno: '',
  922. sResourceid: '',
  923. sWorkcenterno: '',
  924. operatorId: '',
  925. sShiftno: '',
  926. startDate: '',
  927. endDate: '',
  928. },
  929. dataList: [],
  930. detailList: [],
  931. userBuList: [],
  932. inboundSelection: [],
  933. inboundDetailSelection: [],
  934. partSelections1: [],
  935. partSelections2: [],
  936. partList1: [],
  937. partList2: [],
  938. dataListLoading: false,
  939. // 展示列集
  940. columnList: [
  941. {
  942. userId: this.$store.state.user.name,
  943. functionId: 610,
  944. serialNumber: '610Table1OrderNo',
  945. tableId: '610Table1',
  946. tableName: '收货入库任务表',
  947. columnProp: 'notifyNo',
  948. headerAlign: 'center',
  949. align: 'center',
  950. columnLabel: '单据号',
  951. columnHidden: false,
  952. columnImage: false,
  953. columnSortable: false,
  954. sortLv: 0,
  955. status: true,
  956. fixed: '',
  957. columnWidth: 120,
  958. },
  959. /* {
  960. userId: this.$store.state.user.name,
  961. functionId: 610,
  962. serialNumber: '610Table1OrderType',
  963. tableId: '610Table1',
  964. tableName: '收货入库任务表',
  965. columnProp: 'orderType',
  966. headerAlign: 'center',
  967. align: 'center',
  968. columnLabel: '单据类型',
  969. columnHidden: false,
  970. columnImage: false,
  971. columnSortable: false,
  972. sortLv: 0,
  973. status: true,
  974. fixed: '',
  975. columnWidth: 100,
  976. }, */
  977. {
  978. userId: this.$store.state.user.name,
  979. functionId: 610,
  980. serialNumber: '610Table1OrderStatus',
  981. tableId: '610Table1',
  982. tableName: '收货入库任务表',
  983. columnProp: 'status',
  984. headerAlign: 'center',
  985. align: 'left',
  986. columnLabel: '单据状态',
  987. columnHidden: false,
  988. columnImage: false,
  989. columnSortable: false,
  990. sortLv: 0,
  991. status: true,
  992. fixed: '',
  993. columnWidth: 100,
  994. },
  995. /* {
  996. userId: this.$store.state.user.name,
  997. functionId: 610,
  998. serialNumber: '610Table1SupplierId',
  999. tableId: '610Table1',
  1000. tableName: '收货入库任务表',
  1001. columnProp: 'supplierId',
  1002. headerAlign: 'center',
  1003. align: 'left',
  1004. columnLabel: '供应商编码',
  1005. columnHidden: false,
  1006. columnImage: false,
  1007. columnSortable: false,
  1008. sortLv: 0,
  1009. status: true,
  1010. fixed: '',
  1011. columnWidth: 120,
  1012. },
  1013. {
  1014. userId: this.$store.state.user.name,
  1015. functionId: 610,
  1016. serialNumber: '610Table1SupplierName',
  1017. tableId: '610Table1',
  1018. tableName: '收货入库任务表',
  1019. columnProp: 'supplierName',
  1020. headerAlign: 'center',
  1021. align: 'left',
  1022. columnLabel: '供应商名称',
  1023. columnHidden: false,
  1024. columnImage: false,
  1025. columnSortable: false,
  1026. sortLv: 0,
  1027. status: true,
  1028. fixed: '',
  1029. columnWidth: 200,
  1030. }, */
  1031. {
  1032. userId: this.$store.state.user.name,
  1033. functionId: 610,
  1034. serialNumber: '610Table1RequiredInboundDate',
  1035. tableId: '610Table1',
  1036. tableName: '收货入库任务表',
  1037. columnProp: 'notifyDate',
  1038. headerAlign: 'center',
  1039. align: 'center',
  1040. columnLabel: '申请单日期',
  1041. columnHidden: false,
  1042. columnImage: false,
  1043. columnSortable: false,
  1044. sortLv: 0,
  1045. status: true,
  1046. fixed: '',
  1047. columnWidth: 150,
  1048. },
  1049. {
  1050. userId: this.$store.state.user.name,
  1051. functionId: 610,
  1052. serialNumber: '610Table1CreatedDate',
  1053. tableId: '610Table1',
  1054. tableName: '收货入库任务表',
  1055. columnProp: 'enteredDate',
  1056. headerAlign: 'center',
  1057. align: 'center',
  1058. columnLabel: '创建时间',
  1059. columnHidden: false,
  1060. columnImage: false,
  1061. columnSortable: false,
  1062. sortLv: 0,
  1063. status: true,
  1064. fixed: '',
  1065. columnWidth: 170,
  1066. },
  1067. {
  1068. userId: this.$store.state.user.name,
  1069. functionId: 610,
  1070. serialNumber: '610Table1CreatedBy',
  1071. tableId: '610Table1',
  1072. tableName: '收货入库任务表',
  1073. columnProp: 'username',
  1074. headerAlign: 'center',
  1075. align: 'center',
  1076. columnLabel: '创建人',
  1077. columnHidden: false,
  1078. columnImage: false,
  1079. columnSortable: false,
  1080. sortLv: 0,
  1081. status: true,
  1082. fixed: '',
  1083. columnWidth: 100,
  1084. },
  1085. // rqrq - 添加推送WCS字段
  1086. {
  1087. userId: this.$store.state.user.name,
  1088. functionId: 610,
  1089. serialNumber: '610Table1PushWcsFlag',
  1090. tableId: '610Table1',
  1091. tableName: '收货入库任务表',
  1092. columnProp: 'pushWcsFlag',
  1093. headerAlign: 'center',
  1094. align: 'center',
  1095. columnLabel: '推送WCS',
  1096. columnHidden: false,
  1097. columnImage: false,
  1098. columnSortable: false,
  1099. sortLv: 0,
  1100. status: true,
  1101. fixed: '',
  1102. columnWidth: 100,
  1103. },
  1104. /* {
  1105. userId: this.$store.state.user.name,
  1106. functionId: 610,
  1107. serialNumber: '610Table1UpdatedDate',
  1108. tableId: '610Table1',
  1109. tableName: '收货入库任务表',
  1110. columnProp: 'updatedDate',
  1111. headerAlign: 'center',
  1112. align: 'center',
  1113. columnLabel: '更新时间',
  1114. columnHidden: false,
  1115. columnImage: false,
  1116. columnSortable: false,
  1117. sortLv: 0,
  1118. status: true,
  1119. fixed: '',
  1120. columnWidth: 170,
  1121. },
  1122. {
  1123. userId: this.$store.state.user.name,
  1124. functionId: 610,
  1125. serialNumber: '610Table1UpdatedBy',
  1126. tableId: '610Table1',
  1127. tableName: '收货入库任务表',
  1128. columnProp: 'updatedBy',
  1129. headerAlign: 'center',
  1130. align: 'center',
  1131. columnLabel: '更新人',
  1132. columnHidden: false,
  1133. columnImage: false,
  1134. columnSortable: false,
  1135. sortLv: 0,
  1136. status: true,
  1137. fixed: '',
  1138. columnWidth: 100,
  1139. }, */
  1140. ],
  1141. columnList2: [
  1142. {
  1143. userId: this.$store.state.user.name,
  1144. functionId: 701001,
  1145. serialNumber: '701001Table2Orderno',
  1146. tableId: '701001Table2',
  1147. tableName: '查询派工单',
  1148. columnProp: 'orderNo',
  1149. headerAlign: 'center',
  1150. align: 'center',
  1151. columnLabel: 'SHIPMENTID',
  1152. columnHidden: false,
  1153. columnImage: false,
  1154. columnSortable: false,
  1155. sortLv: 0,
  1156. status: true,
  1157. fixed: '',
  1158. columnWidth: 120,
  1159. },
  1160. {
  1161. userId: this.$store.state.user.name,
  1162. functionId: 701001,
  1163. serialNumber: '701001Table2Itemno',
  1164. tableId: '701001Table2',
  1165. tableName: '查询派工单',
  1166. columnProp: 'itemNo',
  1167. headerAlign: 'center',
  1168. align: 'right',
  1169. columnLabel: '工序',
  1170. columnHidden: false,
  1171. columnImage: false,
  1172. columnSortable: false,
  1173. sortLv: 0,
  1174. status: true,
  1175. fixed: '',
  1176. columnWidth: 50,
  1177. },
  1178. {
  1179. userId: this.$store.state.user.name,
  1180. functionId: 701001,
  1181. serialNumber: '701001Table2ItemDesc',
  1182. tableId: '701001Table2',
  1183. tableName: '查询派工单',
  1184. columnProp: 'itemDesc',
  1185. headerAlign: 'center',
  1186. align: 'left',
  1187. columnLabel: '工序名称',
  1188. columnHidden: false,
  1189. columnImage: false,
  1190. columnSortable: false,
  1191. sortLv: 0,
  1192. status: true,
  1193. fixed: '',
  1194. columnWidth: 100,
  1195. },
  1196. {
  1197. userId: this.$store.state.user.name,
  1198. functionId: 701001,
  1199. serialNumber: '701001Table2PartNo',
  1200. tableId: '701001Table2',
  1201. tableName: '查询派工单',
  1202. columnProp: 'partNo',
  1203. headerAlign: 'center',
  1204. align: 'left',
  1205. columnLabel: '物料编码',
  1206. columnHidden: false,
  1207. columnImage: false,
  1208. columnSortable: false,
  1209. sortLv: 0,
  1210. status: true,
  1211. fixed: '',
  1212. columnWidth: 80,
  1213. },
  1214. {
  1215. userId: this.$store.state.user.name,
  1216. functionId: 701001,
  1217. serialNumber: '701001Table2Qtyrequired',
  1218. tableId: '701001Table2',
  1219. tableName: '查询派工单',
  1220. columnProp: 'qtyRequired',
  1221. headerAlign: 'center',
  1222. align: 'right',
  1223. columnLabel: '工单数量',
  1224. columnHidden: false,
  1225. columnImage: false,
  1226. columnSortable: false,
  1227. sortLv: 0,
  1228. status: true,
  1229. fixed: '',
  1230. columnWidth: 80,
  1231. },
  1232. {
  1233. userId: this.$store.state.user.name,
  1234. functionId: 701001,
  1235. serialNumber: '701001Table2Qtyreported',
  1236. tableId: '701001Table2',
  1237. tableName: '查询派工单',
  1238. columnProp: 'qtyReported',
  1239. headerAlign: 'center',
  1240. align: 'right',
  1241. columnLabel: '报工数量',
  1242. columnHidden: false,
  1243. columnImage: false,
  1244. columnSortable: false,
  1245. sortLv: 0,
  1246. status: true,
  1247. fixed: '',
  1248. columnWidth: 100,
  1249. },
  1250. {
  1251. userId: this.$store.state.user.name,
  1252. functionId: 701001,
  1253. serialNumber: '701001Table2SScheduleddate',
  1254. tableId: '701001Table2',
  1255. tableName: '查询工单',
  1256. columnProp: 'sScheduledDate',
  1257. headerAlign: 'center',
  1258. align: 'left',
  1259. columnLabel: '工单日期',
  1260. columnHidden: false,
  1261. columnImage: false,
  1262. columnSortable: false,
  1263. sortLv: 0,
  1264. status: true,
  1265. fixed: '',
  1266. columnWidth: 100,
  1267. },
  1268. {
  1269. userId: this.$store.state.user.name,
  1270. functionId: 701001,
  1271. serialNumber: '701001Table2SWorkcenterno',
  1272. tableId: '701001Table2',
  1273. tableName: '查询派工单',
  1274. columnProp: 'sWorkCenterNo',
  1275. headerAlign: 'center',
  1276. align: 'left',
  1277. columnLabel: '加工中心编码',
  1278. columnHidden: false,
  1279. columnImage: false,
  1280. columnSortable: false,
  1281. sortLv: 0,
  1282. status: true,
  1283. fixed: '',
  1284. columnWidth: 80,
  1285. },
  1286. {
  1287. userId: this.$store.state.user.name,
  1288. functionId: 701001,
  1289. serialNumber: '701001Table2WorkCenterDesc',
  1290. tableId: '701001Table2',
  1291. tableName: '查询工单',
  1292. columnProp: 'workCenterDesc',
  1293. headerAlign: 'center',
  1294. align: 'left',
  1295. columnLabel: '加工中心名称',
  1296. columnHidden: false,
  1297. columnImage: false,
  1298. columnSortable: false,
  1299. sortLv: 0,
  1300. status: true,
  1301. fixed: '',
  1302. columnWidth: 100,
  1303. },
  1304. {
  1305. userId: this.$store.state.user.name,
  1306. functionId: 701001,
  1307. serialNumber: '701001Table2SResourceid',
  1308. tableId: '701001Table2',
  1309. tableName: '查询派工单',
  1310. columnProp: 'sResourceID',
  1311. headerAlign: 'center',
  1312. align: 'left',
  1313. columnLabel: '机台编码',
  1314. columnHidden: false,
  1315. columnImage: false,
  1316. columnSortable: false,
  1317. sortLv: 0,
  1318. status: true,
  1319. fixed: '',
  1320. columnWidth: 60,
  1321. },
  1322. {
  1323. userId: this.$store.state.user.name,
  1324. functionId: 701001,
  1325. serialNumber: '701001Table2ResourceDesc',
  1326. tableId: '701001Table2',
  1327. tableName: '查询派工单',
  1328. columnProp: 'resourceDesc',
  1329. headerAlign: 'center',
  1330. align: 'left',
  1331. columnLabel: '机台名称',
  1332. columnHidden: false,
  1333. columnImage: false,
  1334. columnSortable: false,
  1335. sortLv: 0,
  1336. status: true,
  1337. fixed: '',
  1338. columnWidth: 100,
  1339. },
  1340. {
  1341. userId: this.$store.state.user.name,
  1342. functionId: 701001,
  1343. serialNumber: '701001Table2OperatorDesc',
  1344. tableId: '701001Table2',
  1345. tableName: '查询派工单',
  1346. columnProp: 'operatorDesc',
  1347. headerAlign: 'center',
  1348. align: 'left',
  1349. columnLabel: '操作员',
  1350. columnHidden: false,
  1351. columnImage: false,
  1352. columnSortable: false,
  1353. sortLv: 0,
  1354. status: true,
  1355. fixed: '',
  1356. columnWidth: 100,
  1357. },
  1358. ],
  1359. columnList3: [
  1360. {
  1361. userId: this.$store.state.user.name,
  1362. functionId: 701001,
  1363. serialNumber: '701001Table3ComponentPartNo',
  1364. tableId: '701001Table3',
  1365. tableName: '领料申请BOM子表',
  1366. columnProp: 'componentPartNo',
  1367. headerAlign: 'center',
  1368. align: 'left',
  1369. columnLabel: '物料编码',
  1370. columnHidden: false,
  1371. columnImage: false,
  1372. columnSortable: false,
  1373. sortLv: 0,
  1374. status: true,
  1375. fixed: '',
  1376. columnWidth: 80,
  1377. },
  1378. {
  1379. userId: this.$store.state.user.name,
  1380. functionId: 701001,
  1381. serialNumber: '701001Table3IsInWh',
  1382. tableId: '701001Table3',
  1383. tableName: '领料申请BOM子表',
  1384. columnProp: 'isInWh',
  1385. headerAlign: 'center',
  1386. align: 'center',
  1387. columnLabel: '是否在立库',
  1388. columnHidden: false,
  1389. columnImage: false,
  1390. columnSortable: false,
  1391. sortLv: 0,
  1392. status: true,
  1393. fixed: '',
  1394. columnWidth: 80,
  1395. },
  1396. {
  1397. // rqrq - 新增可用库存列
  1398. userId: this.$store.state.user.name,
  1399. functionId: 701001,
  1400. serialNumber: '701001Table3AvailableQty',
  1401. tableId: '701001Table3',
  1402. tableName: '领料申请BOM子表',
  1403. columnProp: 'availableQty',
  1404. headerAlign: 'center',
  1405. align: 'right',
  1406. columnLabel: '可用库存',
  1407. columnHidden: false,
  1408. columnImage: false,
  1409. columnSortable: false,
  1410. sortLv: 0,
  1411. status: true,
  1412. fixed: '',
  1413. columnWidth: 80,
  1414. },
  1415. {
  1416. userId: this.$store.state.user.name,
  1417. functionId: 701001,
  1418. serialNumber: '701001Table3PartDesc',
  1419. tableId: '701001Table3',
  1420. tableName: '领料申请BOM子表',
  1421. columnProp: 'componentPartDesc',
  1422. headerAlign: 'center',
  1423. align: 'left',
  1424. columnLabel: '物料描述',
  1425. columnHidden: false,
  1426. columnImage: false,
  1427. columnSortable: false,
  1428. sortLv: 0,
  1429. status: true,
  1430. fixed: '',
  1431. columnWidth: 120,
  1432. },
  1433. {
  1434. userId: this.$store.state.user.name,
  1435. functionId: 701001,
  1436. serialNumber: '701001Table3QtyToIssue',
  1437. tableId: '701001Table3',
  1438. tableName: '领料申请BOM子表',
  1439. columnProp: 'qtyOnHand',
  1440. headerAlign: 'center',
  1441. align: 'right',
  1442. columnLabel: '可发数量',
  1443. columnHidden: false,
  1444. columnImage: false,
  1445. columnSortable: false,
  1446. sortLv: 0,
  1447. status: true,
  1448. fixed: '',
  1449. columnWidth: 60,
  1450. },
  1451. {
  1452. userId: this.$store.state.user.name,
  1453. functionId: 701001,
  1454. serialNumber: '701001Table3QtyToIssue',
  1455. tableId: '701001Table3',
  1456. tableName: '领料申请BOM子表',
  1457. columnProp: 'qtyToIssue',
  1458. headerAlign: 'center',
  1459. align: 'right',
  1460. columnLabel: '本次发料数量',
  1461. columnHidden: false,
  1462. columnImage: false,
  1463. columnSortable: false,
  1464. sortLv: 0,
  1465. status: true,
  1466. fixed: '',
  1467. columnWidth: 60,
  1468. },
  1469. {
  1470. userId: this.$store.state.user.name,
  1471. functionId: 701001,
  1472. serialNumber: '701001Table3Remark',
  1473. tableId: '701001Table3',
  1474. tableName: '领料申请BOM子表',
  1475. columnProp: 'remark',
  1476. headerAlign: 'center',
  1477. align: 'left',
  1478. columnLabel: '备注',
  1479. columnHidden: false,
  1480. columnImage: false,
  1481. columnSortable: false,
  1482. sortLv: 0,
  1483. status: true,
  1484. fixed: '',
  1485. columnWidth: 150,
  1486. },
  1487. ],
  1488. columnDetailList: [
  1489. {
  1490. userId: this.$store.state.user.name,
  1491. functionId: 701001,
  1492. serialNumber: '701001Table2Orderno',
  1493. tableId: '701001Table2',
  1494. tableName: '查询派工单',
  1495. columnProp: 'soorderNo',
  1496. headerAlign: 'center',
  1497. align: 'center',
  1498. columnLabel: 'SHIPMENTID',
  1499. columnHidden: false,
  1500. columnImage: false,
  1501. columnSortable: false,
  1502. sortLv: 0,
  1503. status: true,
  1504. fixed: '',
  1505. columnWidth: 120,
  1506. },
  1507. /* {
  1508. userId: this.$store.state.user.name,
  1509. functionId: 701001,
  1510. serialNumber: '701001Table2PartNo',
  1511. tableId: '701001Table2',
  1512. tableName: '查询派工单',
  1513. columnProp: 'fgpartNo',
  1514. headerAlign: 'center',
  1515. align: 'left',
  1516. columnLabel: '物料编码',
  1517. columnHidden: false,
  1518. columnImage: false,
  1519. columnSortable: false,
  1520. sortLv: 0,
  1521. status: true,
  1522. fixed: '',
  1523. columnWidth: 80,
  1524. }, */
  1525. /* {
  1526. userId: this.$store.state.user.name,
  1527. functionId: 701001,
  1528. serialNumber: '701001Table2PartNo',
  1529. tableId: '701001Table2',
  1530. tableName: '查询派工单',
  1531. columnProp: 'partDesc',
  1532. headerAlign: 'center',
  1533. align: 'left',
  1534. columnLabel: '物料名称',
  1535. columnHidden: false,
  1536. columnImage: false,
  1537. columnSortable: false,
  1538. sortLv: 0,
  1539. status: true,
  1540. fixed: '',
  1541. columnWidth: 120,
  1542. showOverflowTooltip: true,
  1543. }, */
  1544. /* {
  1545. userId: this.$store.state.user.name,
  1546. functionId: 701001,
  1547. serialNumber: '701001Table2Qtyrequired',
  1548. tableId: '701001Table2',
  1549. tableName: '查询派工单',
  1550. columnProp: 'lotSize',
  1551. headerAlign: 'center',
  1552. align: 'right',
  1553. columnLabel: '工单数量',
  1554. columnHidden: false,
  1555. columnImage: false,
  1556. columnSortable: false,
  1557. sortLv: 0,
  1558. status: true,
  1559. fixed: '',
  1560. columnWidth: 80,
  1561. }, */
  1562. /* {
  1563. userId: this.$store.state.user.name,
  1564. functionId: 701001,
  1565. serialNumber: '701001Table2Qtyreported',
  1566. tableId: '701001Table2',
  1567. tableName: '查询派工单',
  1568. columnProp: 'unissureQty',
  1569. headerAlign: 'center',
  1570. align: 'right',
  1571. columnLabel: '退料数量',
  1572. columnHidden: false,
  1573. columnImage: false,
  1574. columnSortable: false,
  1575. sortLv: 0,
  1576. status: true,
  1577. fixed: '',
  1578. columnWidth: 80,
  1579. }, */
  1580. {
  1581. userId: this.$store.state.user.name,
  1582. functionId: 701001,
  1583. serialNumber: '701001Table2SScheduleddate',
  1584. tableId: '701001Table2',
  1585. tableName: '查询工单',
  1586. columnProp: 'needDate',
  1587. headerAlign: 'center',
  1588. align: 'left',
  1589. columnLabel: '运输日期',
  1590. columnHidden: false,
  1591. columnImage: false,
  1592. columnSortable: false,
  1593. sortLv: 0,
  1594. status: true,
  1595. fixed: '',
  1596. columnWidth: 100,
  1597. },
  1598. {
  1599. userId: this.$store.state.user.name,
  1600. functionId: 701001,
  1601. serialNumber: '701001Table2PushWcsTime',
  1602. tableId: '701001Table2',
  1603. tableName: '查询工单',
  1604. columnProp: 'pushWcsTime',
  1605. headerAlign: 'center',
  1606. align: 'center',
  1607. columnLabel: '推送WCS时间',
  1608. columnHidden: false,
  1609. columnImage: false,
  1610. columnSortable: false,
  1611. sortLv: 0,
  1612. status: true,
  1613. fixed: '',
  1614. columnWidth: 130,
  1615. },
  1616. {
  1617. userId: this.$store.state.user.name,
  1618. functionId: 701001,
  1619. serialNumber: '701001Table2PushWmsFlag',
  1620. tableId: '701001Table2',
  1621. tableName: '查询派工单',
  1622. columnProp: 'pushWmsFlag',
  1623. headerAlign: 'center',
  1624. align: 'center',
  1625. columnLabel: '是否推送WCS',
  1626. columnHidden: false,
  1627. columnImage: false,
  1628. columnSortable: false,
  1629. sortLv: 0,
  1630. status: true,
  1631. fixed: '',
  1632. columnWidth: 120,
  1633. },
  1634. {
  1635. userId: this.$store.state.user.name,
  1636. functionId: 701001,
  1637. serialNumber: '701001Table2TransportFlag',
  1638. tableId: '701001Table2',
  1639. tableName: '查询派工单',
  1640. columnProp: 'transportFlag',
  1641. headerAlign: 'center',
  1642. align: 'center',
  1643. columnLabel: '立库取出',
  1644. columnHidden: false,
  1645. columnImage: false,
  1646. columnSortable: false,
  1647. sortLv: 0,
  1648. status: true,
  1649. fixed: '',
  1650. columnWidth: 80,
  1651. },
  1652. {
  1653. userId: this.$store.state.user.name,
  1654. functionId: 701001,
  1655. serialNumber: '701001Table2AreaDesc',
  1656. tableId: '701001Table2',
  1657. tableName: '查询派工单',
  1658. columnProp: 'areaDesc',
  1659. headerAlign: 'center',
  1660. align: 'left',
  1661. columnLabel: '配送区域',
  1662. columnHidden: false,
  1663. columnImage: false,
  1664. columnSortable: false,
  1665. sortLv: 0,
  1666. status: true,
  1667. fixed: '',
  1668. columnWidth: 100,
  1669. },
  1670. /* {
  1671. userId: this.$store.state.user.name,
  1672. functionId: 701001,
  1673. serialNumber: '701001Table2SScheduleddate',
  1674. tableId: '701001Table2',
  1675. tableName: '查询工单',
  1676. columnProp: 'finishDate',
  1677. headerAlign: 'center',
  1678. align: 'left',
  1679. columnLabel: '工单结束日期',
  1680. columnHidden: false,
  1681. columnImage: false,
  1682. columnSortable: false,
  1683. sortLv: 0,
  1684. status: true,
  1685. fixed: '',
  1686. columnWidth: 100,
  1687. },
  1688. {
  1689. userId: this.$store.state.user.name,
  1690. functionId: 701001,
  1691. serialNumber: '701001Table2SWorkcenterno',
  1692. tableId: '701001Table2',
  1693. tableName: '查询派工单',
  1694. columnProp: 'sWorkCenterNo',
  1695. headerAlign: 'center',
  1696. align: 'left',
  1697. columnLabel: '加工中心编码',
  1698. columnHidden: false,
  1699. columnImage: false,
  1700. columnSortable: false,
  1701. sortLv: 0,
  1702. status: true,
  1703. fixed: '',
  1704. columnWidth: 80,
  1705. },
  1706. {
  1707. userId: this.$store.state.user.name,
  1708. functionId: 701001,
  1709. serialNumber: '701001Table2WorkCenterDesc',
  1710. tableId: '701001Table2',
  1711. tableName: '查询工单',
  1712. columnProp: 'workCenterDesc',
  1713. headerAlign: 'center',
  1714. align: 'left',
  1715. columnLabel: '加工中心名称',
  1716. columnHidden: false,
  1717. columnImage: false,
  1718. columnSortable: false,
  1719. sortLv: 0,
  1720. status: true,
  1721. fixed: '',
  1722. columnWidth: 100,
  1723. },
  1724. {
  1725. userId: this.$store.state.user.name,
  1726. functionId: 701001,
  1727. serialNumber: '701001Table2SResourceid',
  1728. tableId: '701001Table2',
  1729. tableName: '查询派工单',
  1730. columnProp: 'sResourceID',
  1731. headerAlign: 'center',
  1732. align: 'left',
  1733. columnLabel: '机台编码',
  1734. columnHidden: false,
  1735. columnImage: false,
  1736. columnSortable: false,
  1737. sortLv: 0,
  1738. status: true,
  1739. fixed: '',
  1740. columnWidth: 60,
  1741. },
  1742. {
  1743. userId: this.$store.state.user.name,
  1744. functionId: 701001,
  1745. serialNumber: '701001Table2OperatorDesc',
  1746. tableId: '701001Table2',
  1747. tableName: '查询派工单',
  1748. columnProp: 'operatorDesc',
  1749. headerAlign: 'center',
  1750. align: 'left',
  1751. columnLabel: '操作员',
  1752. columnHidden: false,
  1753. columnImage: false,
  1754. columnSortable: false,
  1755. sortLv: 0,
  1756. status: true,
  1757. fixed: '',
  1758. columnWidth: 100,
  1759. },*/
  1760. ],
  1761. columnDetailList2: [
  1762. {
  1763. columnProp: 'subNo',
  1764. headerAlign: 'center',
  1765. align: 'left',
  1766. columnLabel: '标签条码',
  1767. columnHidden: false,
  1768. columnImage: false,
  1769. columnSortable: false,
  1770. sortLv: 0,
  1771. status: true,
  1772. fixed: '',
  1773. columnWidth: 100,
  1774. },
  1775. {
  1776. columnProp: 'subQty',
  1777. headerAlign: 'center',
  1778. align: 'right',
  1779. columnLabel: '入库数量',
  1780. columnHidden: false,
  1781. columnImage: false,
  1782. columnSortable: false,
  1783. sortLv: 0,
  1784. status: true,
  1785. fixed: '',
  1786. columnWidth: 100,
  1787. },
  1788. {
  1789. columnProp: 'orderRef3',
  1790. headerAlign: 'center',
  1791. align: 'left',
  1792. columnLabel: '入库仓库',
  1793. columnHidden: false,
  1794. columnImage: false,
  1795. columnSortable: false,
  1796. sortLv: 0,
  1797. status: true,
  1798. fixed: '',
  1799. columnWidth: 150,
  1800. },
  1801. {
  1802. columnProp: 'orderRef4',
  1803. headerAlign: 'center',
  1804. align: 'left',
  1805. columnLabel: '入库库位',
  1806. columnHidden: false,
  1807. columnImage: false,
  1808. columnSortable: false,
  1809. sortLv: 0,
  1810. status: true,
  1811. fixed: '',
  1812. columnWidth: 150,
  1813. },
  1814. {
  1815. columnProp: 'userName',
  1816. headerAlign: 'center',
  1817. align: 'left',
  1818. columnLabel: '操作员',
  1819. columnHidden: false,
  1820. columnImage: false,
  1821. columnSortable: false,
  1822. sortLv: 0,
  1823. status: true,
  1824. fixed: '',
  1825. columnWidth: 100,
  1826. },
  1827. {
  1828. columnProp: 'transDate',
  1829. headerAlign: 'center',
  1830. align: 'center',
  1831. columnLabel: '操作时间',
  1832. columnHidden: false,
  1833. columnImage: false,
  1834. columnSortable: false,
  1835. sortLv: 0,
  1836. status: true,
  1837. fixed: '',
  1838. columnWidth: 170,
  1839. },
  1840. ],
  1841. // rqrq - 预留标签清单数据和列定义
  1842. dataList7: [],
  1843. columnList6: [
  1844. {
  1845. userId: this.$store.state.user.name,
  1846. functionId: 444002,
  1847. serialNumber: '444002Table6ItemNo',
  1848. tableId: '444002Table6',
  1849. tableName: '预留标签清单表',
  1850. columnProp: 'itemNo',
  1851. headerAlign: 'center',
  1852. align: 'right',
  1853. columnLabel: '订单序号',
  1854. columnHidden: false,
  1855. columnImage: false,
  1856. columnSortable: false,
  1857. sortLv: 0,
  1858. status: true,
  1859. fixed: '',
  1860. columnWidth: 80,
  1861. },
  1862. {
  1863. userId: this.$store.state.user.name,
  1864. functionId: 444002,
  1865. serialNumber: '444002Table6BomItemNo',
  1866. tableId: '444002Table6',
  1867. tableName: '预留标签清单表',
  1868. columnProp: 'bomItemNo',
  1869. headerAlign: 'center',
  1870. align: 'right',
  1871. columnLabel: '订单物料行号',
  1872. columnHidden: false,
  1873. columnImage: false,
  1874. columnSortable: false,
  1875. sortLv: 0,
  1876. status: true,
  1877. fixed: '',
  1878. columnWidth: 110,
  1879. },
  1880. {
  1881. userId: this.$store.state.user.name,
  1882. functionId: 444002,
  1883. serialNumber: '444002Table6SerialNo',
  1884. tableId: '444002Table6',
  1885. tableName: '预留标签清单表',
  1886. columnProp: 'serialNo',
  1887. headerAlign: 'center',
  1888. align: 'center',
  1889. columnLabel: '标签号',
  1890. columnHidden: false,
  1891. columnImage: false,
  1892. columnSortable: false,
  1893. sortLv: 0,
  1894. status: true,
  1895. fixed: '',
  1896. columnWidth: 150,
  1897. },
  1898. {
  1899. userId: this.$store.state.user.name,
  1900. functionId: 444002,
  1901. serialNumber: '444002Table6TaskRef',
  1902. tableId: '444002Table6',
  1903. tableName: '预留标签清单表',
  1904. columnProp: 'taskRef',
  1905. headerAlign: 'center',
  1906. align: 'center',
  1907. columnLabel: '立库任务号',
  1908. columnHidden: false,
  1909. columnImage: false,
  1910. columnSortable: false,
  1911. sortLv: 0,
  1912. status: true,
  1913. fixed: '',
  1914. columnWidth: 120,
  1915. },
  1916. {
  1917. userId: this.$store.state.user.name,
  1918. functionId: 444002,
  1919. serialNumber: '444002Table6TaskItem',
  1920. tableId: '444002Table6',
  1921. tableName: '预留标签清单表',
  1922. columnProp: 'taskItem',
  1923. headerAlign: 'center',
  1924. align: 'right',
  1925. columnLabel: '立库任务行号',
  1926. columnHidden: false,
  1927. columnImage: false,
  1928. columnSortable: false,
  1929. sortLv: 0,
  1930. status: true,
  1931. fixed: '',
  1932. columnWidth: 110,
  1933. },
  1934. {
  1935. userId: this.$store.state.user.name,
  1936. functionId: 444002,
  1937. serialNumber: '444002Table6OutWcsFlag',
  1938. tableId: '444002Table6',
  1939. tableName: '预留标签清单表',
  1940. columnProp: 'outWcsFlag',
  1941. headerAlign: 'center',
  1942. align: 'center',
  1943. columnLabel: '立库取出',
  1944. columnHidden: false,
  1945. columnImage: false,
  1946. columnSortable: false,
  1947. sortLv: 0,
  1948. status: true,
  1949. fixed: '',
  1950. columnWidth: 80,
  1951. },
  1952. {
  1953. userId: this.$store.state.user.name,
  1954. functionId: 444002,
  1955. serialNumber: '444002Table6OutWcsTime',
  1956. tableId: '444002Table6',
  1957. tableName: '预留标签清单表',
  1958. columnProp: 'outWcsTime',
  1959. headerAlign: 'center',
  1960. align: 'center',
  1961. columnLabel: '取出时间',
  1962. columnHidden: false,
  1963. columnImage: false,
  1964. columnSortable: false,
  1965. sortLv: 0,
  1966. status: true,
  1967. fixed: '',
  1968. columnWidth: 140,
  1969. },
  1970. ],
  1971. rules: {
  1972. bu: [
  1973. {
  1974. required: true,
  1975. message: ' ',
  1976. trigger: ['blur', 'change'],
  1977. },
  1978. ],
  1979. orderType: [
  1980. {
  1981. required: true,
  1982. message: ' ',
  1983. trigger: ['blur', 'change'],
  1984. },
  1985. ],
  1986. requiredInboundDate: [
  1987. {
  1988. required: true,
  1989. message: ' ',
  1990. trigger: ['blur', 'change'],
  1991. },
  1992. ],
  1993. },
  1994. searchLoading: false,
  1995. saveLoading: false,
  1996. activeTable: 'inboundDetail',
  1997. detailModal: false,
  1998. authSearch: false,
  1999. authSave: false,
  2000. authUpdate: false,
  2001. authDelete: false,
  2002. authArchive: false,
  2003. authClose: false,
  2004. authIssue: false,
  2005. editBatchVisible: false,
  2006. menuId: this.$route.meta.menuId,
  2007. tempWareHouseRow: {},
  2008. detailList2: [],
  2009. detailModal2: false,
  2010. currentRow: {},
  2011. seqNoList:[],
  2012. seqNoModalFlag: false,
  2013. saveSeqNoModalFlag: false,
  2014. bomLoadFlag: false,
  2015. sobomList: [],
  2016. itemNo: '',
  2017. materialModalFlag: false,
  2018. sobomData:{},
  2019. notifyNo:'',
  2020. // rqrq - 库存预览相关变量
  2021. previewDialogVisible: false,
  2022. previewLoading: false,
  2023. pushLoading: false,
  2024. previewData: [],
  2025. currentNotifyRow: null,
  2026. shipmentLineList: [],
  2027. shipmentLineLoading: false,
  2028. currentShipmentId: '',
  2029. currentReceiverId: '',
  2030. shipmentLineQueryDialogVisible: false,
  2031. dialogShipmentId: '',
  2032. shipmentLinePrintDialogVisible: false,
  2033. printLoading: false,
  2034. printShipmentLineRow: null,
  2035. // labelTemplateList / printerList:红框已注释,模板与打印机由 customerId 自动匹配
  2036. // labelTemplateList: [],
  2037. // printerList: [],
  2038. printForm: {
  2039. copies: 1,
  2040. assignQty: 0,
  2041. labelType: '外箱标签',
  2042. reportId: '',
  2043. printerName: '',
  2044. },
  2045. columnShipmentLineList: [
  2046. {
  2047. columnProp: 'shipmentId',
  2048. headerAlign: 'center',
  2049. align: 'center',
  2050. columnLabel: 'SHIPMENTID',
  2051. columnHidden: false,
  2052. columnSortable: false,
  2053. columnWidth: 120,
  2054. },
  2055. {
  2056. columnProp: 'shipmentLineNo',
  2057. headerAlign: 'center',
  2058. align: 'right',
  2059. columnLabel: '行号',
  2060. columnHidden: false,
  2061. columnSortable: false,
  2062. columnWidth: 60,
  2063. },
  2064. {
  2065. columnProp: 'inventoryPartNo',
  2066. headerAlign: 'center',
  2067. align: 'left',
  2068. columnLabel: '库存物料号',
  2069. columnHidden: false,
  2070. columnSortable: false,
  2071. columnWidth: 120,
  2072. },
  2073. {
  2074. columnProp: 'sourcePartDescription',
  2075. headerAlign: 'center',
  2076. align: 'left',
  2077. columnLabel: '物料描述',
  2078. columnHidden: false,
  2079. columnSortable: false,
  2080. columnWidth: 150,
  2081. showOverflowTooltip: true,
  2082. },
  2083. {
  2084. columnProp: 'inventoryQty',
  2085. headerAlign: 'center',
  2086. align: 'right',
  2087. columnLabel: '库存数量',
  2088. columnHidden: false,
  2089. columnSortable: false,
  2090. columnWidth: 100,
  2091. },
  2092. {
  2093. columnProp: 'qtyAssigned',
  2094. headerAlign: 'center',
  2095. align: 'right',
  2096. columnLabel: '已分配数量',
  2097. columnHidden: false,
  2098. columnSortable: false,
  2099. columnWidth: 100,
  2100. },
  2101. {
  2102. columnProp: 'qtyPicked',
  2103. headerAlign: 'center',
  2104. align: 'right',
  2105. columnLabel: '已拣货数量',
  2106. columnHidden: false,
  2107. columnSortable: false,
  2108. columnWidth: 100,
  2109. },
  2110. {
  2111. columnProp: 'qtyShipped',
  2112. headerAlign: 'center',
  2113. align: 'right',
  2114. columnLabel: '已发货数量',
  2115. columnHidden: false,
  2116. columnSortable: false,
  2117. columnWidth: 100,
  2118. },
  2119. {
  2120. columnProp: 'inventoryUom',
  2121. headerAlign: 'center',
  2122. align: 'center',
  2123. columnLabel: '单位',
  2124. columnHidden: false,
  2125. columnSortable: false,
  2126. columnWidth: 60,
  2127. },
  2128. {
  2129. columnProp: 'sourceRef1',
  2130. headerAlign: 'center',
  2131. align: 'center',
  2132. columnLabel: '源引用1',
  2133. columnHidden: false,
  2134. columnSortable: false,
  2135. columnWidth: 100,
  2136. },
  2137. {
  2138. columnProp: 'sourceRef2',
  2139. headerAlign: 'center',
  2140. align: 'right',
  2141. columnLabel: '源引用2',
  2142. columnHidden: false,
  2143. columnSortable: false,
  2144. columnWidth: 80,
  2145. },
  2146. {
  2147. columnProp: 'sourceRef3',
  2148. headerAlign: 'center',
  2149. align: 'center',
  2150. columnLabel: '源引用3',
  2151. columnHidden: false,
  2152. columnSortable: false,
  2153. columnWidth: 80,
  2154. },
  2155. ],
  2156. }
  2157. },
  2158. computed: {
  2159. canStartShipmentLinePrint() {
  2160. return !!(
  2161. this.printForm.copies > 0 &&
  2162. this.printForm.assignQty > 0 &&
  2163. this.printShipmentLineRow &&
  2164. this.currentReceiverId
  2165. )
  2166. },
  2167. },
  2168. mounted() {
  2169. this.$nextTick(() => {
  2170. this.height = window.innerHeight / 2 - 100
  2171. /*第二个表格高度的动态调整*/
  2172. this.secondHeight = window.innerHeight - this.height - 170
  2173. })
  2174. },
  2175. created() {
  2176. // 按钮控制
  2177. this.getButtonAuthData()
  2178. // 获取用户的 site 和 bu
  2179. //this.getSiteAndBuByUserName()
  2180. // 动态列
  2181. //this.getTableUserColumn(this.$route.meta.menuId + 'table1', 1)
  2182. //this.getTableUserColumn(this.$route.meta.menuId + 'table2', 2)
  2183. if (!this.authSearch) {
  2184. // 获取数据列表
  2185. this.getDataList()
  2186. }
  2187. },
  2188. methods: {
  2189. // 获取用户的bu
  2190. getSiteAndBuByUserName() {
  2191. let tempData = {
  2192. username: this.$store.state.user.name,
  2193. }
  2194. getSiteAndBuByUserName(tempData).then(({ data }) => {
  2195. if (data.code === 0) {
  2196. this.userBuList = data.rows
  2197. }
  2198. })
  2199. },
  2200. // 获取数据列表
  2201. getDataList() {
  2202. this.searchData.site = this.$store.state.user.site // rqrq - 设置site
  2203. this.searchData.limit = this.pageSize
  2204. this.searchData.page = this.pageIndex
  2205. this.searchData.orderStatus = this.searchData.orderStatusList.join(',')
  2206. console.log("this.",this.searchData);
  2207. this.searchLoading = true
  2208. searchNotifyHeader(this.searchData)
  2209. .then(({ data }) => {
  2210. if (data.code === 0) {
  2211. this.dataList = data.page.list
  2212. this.pageIndex = data.page.currPage
  2213. this.pageSize = data.page.pageSize
  2214. this.totalPage = data.page.totalCount
  2215. console.log("this.dataList",this.dataList);
  2216. // 判断是否全部存在数据
  2217. if (this.dataList.length > 0) {
  2218. // 设置选中行并高亮第一行
  2219. this.$nextTick(() => {
  2220. this.$refs.inboundTable.setCurrentRow(this.dataList[0])
  2221. this.currentRow = JSON.parse(JSON.stringify(this.dataList[0]))
  2222. // 调用getNotifyNoDetail方法获取入库明细
  2223. this.getNotifyNoDetail()
  2224. })
  2225. } else {
  2226. this.currentRow = {}
  2227. this.detailList = []
  2228. }
  2229. }
  2230. })
  2231. .finally(() => {
  2232. this.searchLoading = false
  2233. })
  2234. },
  2235. // 每页数
  2236. sizeChangeHandle(val) {
  2237. this.pageSize = val
  2238. this.pageIndex = 1
  2239. this.getDataList()
  2240. },
  2241. // 当前页
  2242. currentChangeHandle(val) {
  2243. this.pageIndex = val
  2244. this.getDataList()
  2245. },
  2246. // 子明细每页数
  2247. sizeChangeHandle2(val) {
  2248. this.pageSize2 = val
  2249. this.pageIndex2 = 1
  2250. this.searchTypeChange()
  2251. },
  2252. // 子明细当前页
  2253. currentChangeHandle2(val) {
  2254. this.pageIndex2 = val
  2255. this.searchTypeChange()
  2256. },
  2257. saveModal() {
  2258. this.modalData = {
  2259. flag: '1',
  2260. site: '',
  2261. orderNo: '',
  2262. orderType: '',
  2263. orderStatus: '',
  2264. requiredInboundDate: '',
  2265. supplierId: '',
  2266. supplierName: '',
  2267. remarks: '',
  2268. createdBy: this.$store.state.user.name,
  2269. }
  2270. this.modalDisableFlag = false
  2271. this.modalFlag = true
  2272. },
  2273. updateModal(row) {
  2274. if (this.currentRow.orderType === '采购入库') {
  2275. this.$message.warning('采购入库单据不能编辑!')
  2276. return
  2277. }
  2278. this.modalData = {
  2279. flag: '2',
  2280. site: row.site,
  2281. bu: row.site + '_' + row.buNo,
  2282. buNo: row.buNo,
  2283. orderNo: row.orderNo,
  2284. orderType: row.orderType,
  2285. requiredInboundDate: row.requiredInboundDate,
  2286. supplierId: row.supplierId,
  2287. supplierName: row.supplierName,
  2288. remarks: row.remarks,
  2289. updatedBy: this.$store.state.user.name,
  2290. }
  2291. this.modalDisableFlag = true
  2292. this.modalFlag = true
  2293. },
  2294. saveData() {
  2295. if (this.modalData.orderType === '' || this.modalData.orderType == null) {
  2296. this.$message.warning('请选择单据类型!')
  2297. return
  2298. }
  2299. if (
  2300. this.modalData.requiredInboundDate === '' ||
  2301. this.modalData.requiredInboundDate == null
  2302. ) {
  2303. this.$message.warning('请选择要求入库日期!')
  2304. return
  2305. }
  2306. this.saveLoading = true
  2307. if (this.modalData.flag === '1') {
  2308. // 新增
  2309. this.modalData.orderType = '退料入库'
  2310. this.modalData.site = localStorage.getItem('site')
  2311. createNotify(this.modalData)
  2312. .then(({ data }) => {
  2313. if (data && data.code === 0) {
  2314. this.getDataList()
  2315. this.modalFlag = false
  2316. this.$message.success('操作成功')
  2317. } else {
  2318. this.$message.error(data.msg)
  2319. }
  2320. })
  2321. .finally(() => {
  2322. this.saveLoading = false
  2323. })
  2324. } else {
  2325. // 修改
  2326. updateInboundNotification(this.modalData)
  2327. .then(({ data }) => {
  2328. if (data && data.code === 0) {
  2329. this.getDataList()
  2330. this.modalFlag = false
  2331. this.$message.success('操作成功')
  2332. } else {
  2333. this.$message.error(data.msg)
  2334. }
  2335. })
  2336. .finally(() => {
  2337. this.saveLoading = false
  2338. })
  2339. }
  2340. },
  2341. // 删除
  2342. deleteModal() {
  2343. if (this.currentRow.orderType === '采购入库') {
  2344. this.$message.warning('采购入库单据不能编辑!')
  2345. return
  2346. }
  2347. if (this.inboundSelection.length === 0) {
  2348. this.$message.warning('请勾选要删除的单据!')
  2349. return
  2350. }
  2351. this.$confirm(
  2352. `是否删除该 ` + this.inboundSelection.length + ` 条记录?`,
  2353. '提示',
  2354. {
  2355. confirmButtonText: '确定',
  2356. cancelButtonText: '取消',
  2357. type: 'warning',
  2358. }
  2359. ).then(() => {
  2360. let tempData = {
  2361. submitList: this.inboundSelection,
  2362. }
  2363. deleteInboundNotification(tempData).then(({ data }) => {
  2364. if (data && data.code === 0) {
  2365. this.getDataList()
  2366. this.inboundSelection = []
  2367. this.$message.success('操作成功')
  2368. } else {
  2369. this.$message.error(data.msg)
  2370. }
  2371. })
  2372. })
  2373. },
  2374. // 归档
  2375. archiveModal() {},
  2376. // 关闭
  2377. closeModal(row) {
  2378. this.$confirm(
  2379. `确认关闭 ` + row.notifyNo + ` 记录?`,
  2380. '提示',
  2381. {
  2382. confirmButtonText: '确定',
  2383. cancelButtonText: '取消',
  2384. type: 'warning',
  2385. }
  2386. ).then(() => {
  2387. closeInboundNotification(row).then(({ data }) => {
  2388. if (data && data.code === 0) {
  2389. this.getDataList()
  2390. this.$message.success('操作成功')
  2391. } else {
  2392. this.$message.error(data.msg)
  2393. }
  2394. })
  2395. })
  2396. },
  2397. // 下达
  2398. issueModal(row) {
  2399. if (this.currentRow.orderType === '采购入库') {
  2400. this.$message.warning('采购入库单据不能编辑!')
  2401. return
  2402. }
  2403. issueInboundNotification(row).then(({ data }) => {
  2404. if (data && data.code === 0) {
  2405. this.getDataList()
  2406. this.$message.success('操作成功')
  2407. } else {
  2408. this.$message.error(data.msg)
  2409. }
  2410. })
  2411. },
  2412. // 列表表格选择替换
  2413. tabClick(tab, event) {
  2414. // 刷新列表数据
  2415. this.refreshCurrentTabTable()
  2416. },
  2417. // 当前值发生变化的时候修改 - rqrq
  2418. changeCurrentRow(row, oldRow) {
  2419. // 判断是否是获取焦点的事件
  2420. if (row) {
  2421. this.currentRow = JSON.parse(JSON.stringify(row))
  2422. // 刷新当前页签的数据(根据当前激活的Tab刷新对应数据)- rqrq
  2423. this.refreshCurrentTabTable()
  2424. }
  2425. },
  2426. // 复选
  2427. selectionInbound(val) {
  2428. this.inboundSelection = val
  2429. },
  2430. // 明细复选
  2431. selectionInboundDetail(val) {
  2432. this.inboundDetailSelection = val
  2433. },
  2434. rowStyle({ row }) {
  2435. if (this.currentRow.notifyNo === row.notifyNo) {
  2436. return { 'background-color': '#E8F7F6', cursor: 'pointer' }
  2437. }
  2438. },
  2439. // 单机选中信息 - rqrq
  2440. inboundClickRow(row, column) {
  2441. console.log("row",row);
  2442. this.currentRow = JSON.parse(JSON.stringify(row))
  2443. // 点击主表行时,刷新当前页签的数据 - rqrq
  2444. this.refreshCurrentTabTable()
  2445. },
  2446. // 刷新页签的table数据 - rqrq
  2447. refreshCurrentTabTable() {
  2448. if (this.activeTable === 'inboundDetail') {
  2449. // 刷新已申请SHIPMENT明细数据 - rqrq
  2450. this.getNotifyNoDetail()
  2451. } else if (this.activeTable === 'labelDetail') {
  2452. // 查询预留标签清单 - rqrq
  2453. this.searchMaterialListDetail()
  2454. }
  2455. },
  2456. // rqrq - 查询预留标签清单
  2457. searchMaterialListDetail() {
  2458. if (!this.currentRow || !this.currentRow.notifyNo) {
  2459. this.dataList7 = []
  2460. return
  2461. }
  2462. const queryData = {
  2463. site: this.currentRow.site || this.$store.state.user.site,
  2464. notifyNo: this.currentRow.notifyNo
  2465. }
  2466. this.searchLoading = true
  2467. searchMaterialListDetail(queryData)
  2468. .then(({ data }) => {
  2469. this.searchLoading = false
  2470. if (data && data.code === 0) {
  2471. this.dataList7 = data.rows || []
  2472. } else {
  2473. this.dataList7 = []
  2474. }
  2475. })
  2476. .catch(() => {
  2477. this.searchLoading = false
  2478. this.dataList7 = []
  2479. })
  2480. },
  2481. // 查询物料缺陷跟踪
  2482. getInboundDetail() {
  2483. let templateData = {
  2484. site: this.currentRow.site,
  2485. buNo: this.currentRow.buNo,
  2486. orderNo: this.currentRow.orderNo,
  2487. }
  2488. /* getInboundDetail(templateData).then(({ data }) => {
  2489. this.detailList = data.rows
  2490. }) */
  2491. },
  2492. // 新增明细
  2493. addInboundDetailModal() {
  2494. if (this.currentRow.orderType === '采购入库') {
  2495. this.$message.warning('采购入库单据不能编辑!')
  2496. return
  2497. }
  2498. this.detailSearchData = {
  2499. site: this.currentRow.site,
  2500. buNo: this.currentRow.buNo,
  2501. orderNo: this.currentRow.orderNo,
  2502. orderType: this.currentRow.orderType,
  2503. relatedOrderNo: '',
  2504. status: '',
  2505. partNo: '',
  2506. partDesc: '',
  2507. partNos: '',
  2508. page: 1,
  2509. limit: 10,
  2510. }
  2511. this.partSelections1 = []
  2512. this.partSelections2 = []
  2513. this.partList1 = []
  2514. this.partList2 = []
  2515. this.pageIndex2 = 1
  2516. this.pageSize2 = 20
  2517. this.totalPage2 = 0
  2518. if (this.currentRow.orderType === '生产入库') {
  2519. this.detailSearchData.status = '已开工'
  2520. }
  2521. this.handleGetProjectPartList()
  2522. },
  2523. handleGetProjectPartList() {
  2524. this.detailSearchData.limit = this.pageSize2
  2525. this.detailSearchData.page = this.pageIndex2
  2526. getInboundPartList(this.detailSearchData).then(({ data }) => {
  2527. if (data && data.code === 0) {
  2528. this.partList1 = data.page.list
  2529. this.pageIndex2 = data.page.currPage
  2530. this.pageSize2 = data.page.pageSize
  2531. this.totalPage2 = data.page.totalCount
  2532. this.detailModal = true
  2533. }
  2534. })
  2535. },
  2536. chooseSOSModal() {
  2537. this.seqNoData = {
  2538. site: localStorage.getItem('site'),
  2539. orderno: '',
  2540. seqno: '',
  2541. sResourceid: '',
  2542. sWorkcenterno: '',
  2543. operatorId: '',
  2544. sShiftno: '',
  2545. startDate: this.dayjs().format('YYYY-MM-DD'),
  2546. endDate: this.dayjs().format('YYYY-MM-DD'),
  2547. }
  2548. this.searchSOSRouting()
  2549. this.seqNoModalFlag = true
  2550. },
  2551. searchSOSRouting() {
  2552. getSOScheduledRoutingListForIssure(this.seqNoData).then(({ data }) => {
  2553. if (data.code === 0) {
  2554. this.seqNoList = data.rows
  2555. }
  2556. })
  2557. },
  2558. // 可选物料
  2559. partClickRow1(row) {
  2560. this.$refs.partTable1.toggleRowSelection(row)
  2561. },
  2562. // 已有物料
  2563. partClickRow2(row) {
  2564. this.$refs.partTable2.toggleRowSelection(row)
  2565. },
  2566. selectionPart1(val) {
  2567. this.partSelections1 = val
  2568. },
  2569. selectionPart2(val) {
  2570. this.partSelections2 = val
  2571. },
  2572. chooseSOS(row) {
  2573. if (this.dataList.length > 0) {
  2574. let stop = false
  2575. for (let i = 0; i < this.dataList.length; i++) {
  2576. if (this.dataList[i].seqNo == row.seqno) {
  2577. stop = true
  2578. }
  2579. }
  2580. if (stop) {
  2581. this.$alert('已经选择过此派工单,请返回点击明细直接操作!!', '提示', {
  2582. confirmButtonText: '确定',
  2583. })
  2584. return false
  2585. }
  2586. }
  2587. this.notifyOrderData.partNo = row.partNo
  2588. this.notifyOrderData.orderNo = row.orderNo
  2589. this.notifyOrderData.itemNo = row.itemNo
  2590. this.notifyOrderData.seqNo = row.seqNo
  2591. this.notifyOrderData.partDesc = row.partDesc
  2592. this.notifyOrderData.qtyRequired = row.qtyRequired
  2593. this.notifyOrderData.sResourceID = row.sResourceID
  2594. this.notifyOrderData.issureQty = ''
  2595. this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
  2596. this.notifyOrderData.locationNo = row.sResourceID
  2597. this.saveSeqNoModalFlag = true
  2598. },
  2599. qtyAllForSeqNo() {
  2600. this.notifyOrderData.issureQty = this.notifyOrderData.qtyRequired
  2601. },
  2602. saveSOS() {
  2603. if (
  2604. this.notifyOrderData.needDate == null ||
  2605. this.notifyOrderData.needDate == ''
  2606. ) {
  2607. this.$message.warning('请选择时间!')
  2608. return false
  2609. }
  2610. if (
  2611. this.notifyOrderData.issureQty == null ||
  2612. this.notifyOrderData.issureQty == '' ||
  2613. this.notifyOrderData.issureQty <= 0
  2614. ) {
  2615. this.$message.warning('请填写领取数量!')
  2616. return false
  2617. }
  2618. let row = this.notifyOrderData
  2619. if (this.dataList.length > 0) {
  2620. let stop = false
  2621. for (let i = 0; i < this.dataList.length; i++) {
  2622. if (this.dataList[i].seqNo == row.seqno) {
  2623. stop = true
  2624. }
  2625. }
  2626. if (stop) {
  2627. this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
  2628. confirmButtonText: '确定',
  2629. })
  2630. return false
  2631. }
  2632. }
  2633. this.$confirm('确定选择工单' + row.seqno + '?', '提示', {
  2634. confirmButtonText: '确定',
  2635. cancelButtonText: '取消',
  2636. type: 'warning',
  2637. }).then(() => {
  2638. let inData = {
  2639. site: localStorage.getItem('site'),
  2640. notifyNo: this.notifyNo,
  2641. fGPartNo: row.partNo,
  2642. sOOrderNo: row.orderno,
  2643. opsItemNo: row.itemno,
  2644. seqNo: row.seqno,
  2645. locationNo: row.locationNo,
  2646. needDate: row.needDate,
  2647. issureQty: row.issureQty,
  2648. }
  2649. saveSOIssueNotifyOrderList(inData).then(({ data }) => {
  2650. if (data.code === 0) {
  2651. this.saveSeqNoModalFlag = false
  2652. this.getNotifyNoDetail()
  2653. this.enterSOS(row)
  2654. this.itemNo = data.itemNo
  2655. } else {
  2656. this.$alert(data.msg, '错误', {
  2657. confirmButtonText: '确定',
  2658. })
  2659. }
  2660. })
  2661. })
  2662. },
  2663. getNotifyNoDetail() {
  2664. if (!this.currentRow || !this.currentRow.notifyNo) {
  2665. this.detailList = []
  2666. return
  2667. }
  2668. let inData = {
  2669. site: this.currentRow.site || localStorage.getItem('site'),
  2670. notifyNo: this.currentRow.notifyNo,
  2671. }
  2672. getNotifyNoDetail(inData).then(({ data }) => {
  2673. if (data.code === 0) {
  2674. this.detailList = data.rows || []
  2675. } else {
  2676. this.detailList = []
  2677. }
  2678. }).catch(() => {
  2679. this.detailList = []
  2680. })
  2681. },
  2682. enterSOS(row) {
  2683. this.seqNoModalFlag = false
  2684. this.materialModalFlag = true
  2685. this.sobomList = []
  2686. this.sobomData = {
  2687. orderno: row.orderno,
  2688. seqno: row.seqno,
  2689. partNo: row.partNo,
  2690. }
  2691. this.bomLoadFlag = true
  2692. let inData = {
  2693. site: localStorage.getItem('site'),
  2694. notifyNo: this.notifyNo,
  2695. orderno: row.orderno,
  2696. seqno: row.seqno,
  2697. partNo: row.partNo,
  2698. itemno: row.itemno,
  2699. }
  2700. getSOSBOMForIssure(inData).then(({ data }) => {
  2701. this.bomLoadFlag = false
  2702. if (data.code === 0) {
  2703. this.sobomList = data.rows
  2704. }
  2705. })
  2706. },
  2707. // 改变事件
  2708. searchTypeChange() {
  2709. // 使用 map 提取 partNo 并加上单引号
  2710. let partNos = this.partList2.map((part) => part.partNo)
  2711. // 使用 join 将 partNo 连接成一个字符串
  2712. this.detailSearchData.partNos = partNos.join(',')
  2713. this.handleGetProjectPartList()
  2714. },
  2715. // 添加物料
  2716. addPart() {
  2717. if (this.partSelections1 == null || this.partSelections1.length === 0) {
  2718. this.$message.warning('请选择可选物料!')
  2719. return
  2720. }
  2721. this.partSelections1.forEach((item) => {
  2722. this.partList2.push(item)
  2723. })
  2724. this.searchTypeChange()
  2725. },
  2726. // 删除物料
  2727. deletePart() {
  2728. if (this.partSelections2 == null || this.partSelections2.length === 0) {
  2729. this.$message.warning('请选择已选物料!')
  2730. return
  2731. }
  2732. this.partSelections2.forEach((item) => {
  2733. // 使用 filter 过滤掉 partList2 中与 selection.part_no 相同的项
  2734. this.partList2 = this.partList2.filter(
  2735. (part) => part.partNo !== item.partNo
  2736. )
  2737. })
  2738. this.searchTypeChange()
  2739. },
  2740. // 新增明细
  2741. saveInboundDetail() {
  2742. let tempData = {
  2743. orderNo: this.detailSearchData.orderNo,
  2744. createdBy: this.$store.state.user.name,
  2745. partList: this.partList2,
  2746. }
  2747. this.saveLoading = true
  2748. saveInboundDetail(tempData)
  2749. .then(({ data }) => {
  2750. if (data && data.code === 0) {
  2751. this.getInboundDetail()
  2752. this.detailModal = false
  2753. this.$message.success('操作成功')
  2754. } else {
  2755. this.$message.error(data.msg)
  2756. }
  2757. })
  2758. .finally(() => {
  2759. this.saveLoading = false
  2760. })
  2761. },
  2762. // 删除物料缺陷跟踪
  2763. deleteInboundDetail() {
  2764. if (this.currentRow.orderType === '采购入库') {
  2765. this.$message.warning('采购入库单据不能编辑!')
  2766. return
  2767. }
  2768. if (this.inboundDetailSelection.length === 0) {
  2769. this.$message.warning('请勾选要删除的单据!')
  2770. return
  2771. }
  2772. this.$confirm(
  2773. `是否删除该 ` + this.inboundDetailSelection.length + ` 条记录?`,
  2774. '提示',
  2775. {
  2776. confirmButtonText: '确定',
  2777. cancelButtonText: '取消',
  2778. type: 'warning',
  2779. }
  2780. ).then(() => {
  2781. let tempData = {
  2782. submitList: this.inboundDetailSelection,
  2783. }
  2784. deleteInboundDetail(tempData).then(({ data }) => {
  2785. if (data && data.code === 0) {
  2786. this.getInboundDetail()
  2787. this.inboundDetailSelection = []
  2788. this.$message.success('操作成功')
  2789. } else {
  2790. this.$message.error(data.msg)
  2791. }
  2792. })
  2793. })
  2794. },
  2795. // 批量编辑模态框
  2796. editBatchModel() {
  2797. if (this.currentRow.orderType === '采购入库') {
  2798. this.$message.warning('采购入库单据不能编辑!')
  2799. return
  2800. }
  2801. if (this.editBatchVisible) {
  2802. this.editBatchVisible = false
  2803. } else {
  2804. this.editBatchVisible = true
  2805. }
  2806. },
  2807. // 批量保存
  2808. batchModel() {
  2809. let params = []
  2810. params = this.detailList
  2811. this.saveLoading = true
  2812. updateInboundDetail(params)
  2813. .then(({ data }) => {
  2814. if (data && data.code === 0) {
  2815. this.getInboundDetail()
  2816. this.$message.success(data.msg)
  2817. this.editBatchVisible = false
  2818. } else {
  2819. this.$message.error(data.msg)
  2820. }
  2821. })
  2822. .finally(() => {
  2823. this.saveLoading = false
  2824. })
  2825. },
  2826. // 入库明细
  2827. inboundDetailModal(row) {
  2828. getInboundDetail2(row).then(({ data }) => {
  2829. if (data && data.code === 0) {
  2830. this.detailList2 = data.rows
  2831. } else {
  2832. this.detailList2 = []
  2833. }
  2834. })
  2835. this.detailModal2 = true
  2836. },
  2837. // 库位输入校验
  2838. supplierBlur(tagNo) {
  2839. let tempData = {
  2840. tagno: tagNo,
  2841. conditionSql:
  2842. " and SupplierID = '" +
  2843. this.modalData.supplierId +
  2844. "'" +
  2845. " and site = '" +
  2846. this.modalData.site +
  2847. "'",
  2848. }
  2849. getChooselist(tempData).then(({ data }) => {
  2850. if (data && data.code === 0) {
  2851. if (data.baseListData.length > 0) {
  2852. this.modalData.supplierId = data.baseListData[0].SupplierID
  2853. this.modalData.supplierName = data.baseListData[0].SupplierName
  2854. } else {
  2855. this.modalData.supplierName = ''
  2856. }
  2857. }
  2858. })
  2859. },
  2860. chooseWareHouse(row) {
  2861. this.tempWareHouseRow = row
  2862. this.getBaseList(20)
  2863. },
  2864. saveMaterialDetail() {
  2865. for (let i = 0; i < this.sobomList.length; i++) {
  2866. this.sobomList[i].notifyNo = this.currentRow.notifyNo
  2867. this.sobomList[i].site = this.$store.state.user.site
  2868. this.sobomList[i].bomItemNo =
  2869. this.sobomList[i].lineItemNo || this.sobomList[i].bomItemNo
  2870. }
  2871. let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
  2872. if (materialList.length == 0) {
  2873. this.$alert('没有需要保存的内容!', '提示', {
  2874. confirmButtonText: '确定',
  2875. })
  2876. return false
  2877. }
  2878. console.log('this.sobomList', materialList)
  2879. saveShipmentMaterialDetail(materialList).then(({ data }) => {
  2880. if (data.code === 0) {
  2881. this.materialModalFlag = false
  2882. this.$message.success('操作成功')
  2883. } else {
  2884. this.$alert(data.msg, '错误', {
  2885. confirmButtonText: '确定',
  2886. })
  2887. }
  2888. })
  2889. },
  2890. // 获取基础数据列表S
  2891. getBaseList(val, type) {
  2892. this.tagNo = val
  2893. this.tagType = type
  2894. this.$nextTick(() => {
  2895. let strVal = ''
  2896. if (val === 506) {
  2897. strVal = this.modalData.supplierId
  2898. this.$refs.baseList.init(val, strVal)
  2899. }
  2900. if (val === 20) {
  2901. strVal = this.tempWareHouseRow.inWarehouse
  2902. this.$refs.baseList.init(val, strVal)
  2903. }
  2904. })
  2905. },
  2906. // 列表方法的回调
  2907. getBaseData(val) {
  2908. if (this.tagNo === 506) {
  2909. this.modalData.supplierId = val.SupplierID
  2910. this.modalData.supplierName = val.SupplierName
  2911. }
  2912. if (this.tagNo === 20) {
  2913. this.tempWareHouseRow.inWarehouse = val.WareHouseID
  2914. this.tempWareHouseRow.inWarehouseName = val.WareHouseName
  2915. console.log(this.tempWareHouseRow)
  2916. }
  2917. },
  2918. async exportExcel() {
  2919. this.searchData.limit = -1
  2920. this.searchData.page = 1
  2921. excel.exportTable({
  2922. url: '/inbound/searchInboundNotification',
  2923. columnMapping: this.columnList, //可以直接用table,不需要的列就剔除
  2924. mergeSetting: [], //需要合并的列
  2925. params: this.searchData,
  2926. fileName: this.exportName + '.xlsx',
  2927. rowFetcher: (res) => res.data,
  2928. columnFormatter: [],
  2929. dropColumns: [],
  2930. })
  2931. },
  2932. // 动态列开始 获取 用户保存的 格式列
  2933. async getTableUserColumn(tableId, columnId) {
  2934. let queryTableUser = {
  2935. userId: this.$store.state.user.name,
  2936. functionId: this.$route.meta.menuId,
  2937. tableId: tableId,
  2938. status: true,
  2939. languageCode: this.$i18n.locale,
  2940. }
  2941. await getTableUserListLanguage(queryTableUser).then(({ data }) => {
  2942. if (data.rows.length > 0) {
  2943. switch (columnId) {
  2944. case 1:
  2945. this.columnList = data.rows
  2946. break
  2947. }
  2948. } else {
  2949. this.getColumnList(tableId, columnId)
  2950. }
  2951. })
  2952. },
  2953. enterSOSDetail(row) {
  2954. let rows = {
  2955. site: this.$store.state.user.site,
  2956. notifyNo: this.currentRow.notifyNo,
  2957. soorderNo: row.soorderNo,
  2958. seqNo: row.seqNo,
  2959. partNo: row.fgpartNo,
  2960. itemNo: row.itemNo,
  2961. }
  2962. this.searchUnissueNotifyMaterialList(rows)
  2963. },
  2964. searchUnissueNotifyMaterialList(row){
  2965. this.bomLoadFlag = true
  2966. this.materialModalFlag = true
  2967. searchUnissueNotifyMaterialList(row).then(({ data }) => {
  2968. if (data.code === 0) {
  2969. this.sobomList = data.rows
  2970. }
  2971. }).finally(() => {
  2972. this.bomLoadFlag = false
  2973. })
  2974. },
  2975. // 删除
  2976. deleteNotifySOS(row) {
  2977. this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
  2978. confirmButtonText: '确定',
  2979. cancelButtonText: '取消',
  2980. type: 'warning',
  2981. })
  2982. .then(() => {
  2983. deleteNotifyUnissue(row).then(({ data }) => {
  2984. if (data && data.code === 0) {
  2985. this.getNotifyNoDetail()
  2986. this.$message({
  2987. message: '操作成功',
  2988. type: 'success',
  2989. duration: 1500,
  2990. onClose: () => {},
  2991. })
  2992. } else {
  2993. this.$alert(data.msg, '错误', {
  2994. confirmButtonText: '确定',
  2995. })
  2996. }
  2997. })
  2998. })
  2999. .catch(() => {})
  3000. },
  3001. // 获取 tableDefault 列
  3002. async getColumnList(tableId, columnId) {
  3003. let queryTable = {
  3004. functionId: this.$route.meta.menuId,
  3005. tableId: tableId,
  3006. languageCode: this.$i18n.locale,
  3007. }
  3008. await getTableDefaultListLanguage(queryTable).then(({ data }) => {
  3009. if (data.rows.length !== 0) {
  3010. switch (columnId) {
  3011. case 1:
  3012. this.columnList = data.rows
  3013. break
  3014. }
  3015. }
  3016. })
  3017. },
  3018. //获取按钮的权限数据
  3019. getButtonAuthData() {
  3020. if (this.$store.state.user.id === 1) {
  3021. return
  3022. }
  3023. let searchFlag = this.isAuth(this.menuId + ':search')
  3024. let saveFlag = this.isAuth(this.menuId + ':save')
  3025. let updateFlag = this.isAuth(this.menuId + ':update')
  3026. let deleteFlag = this.isAuth(this.menuId + ':delete')
  3027. let archiveFlag = this.isAuth(this.menuId + ':archive')
  3028. let closeFlag = this.isAuth(this.menuId + ':close')
  3029. let issueFlag = this.isAuth(this.menuId + ':issue')
  3030. //处理页面的权限数据
  3031. this.authSearch = !searchFlag
  3032. this.authSave = !saveFlag
  3033. this.authUpdate = !updateFlag
  3034. this.authDelete = !deleteFlag
  3035. this.authArchive = !archiveFlag
  3036. this.authClose = !closeFlag
  3037. this.authIssue = !issueFlag
  3038. },
  3039. /**
  3040. * @Description 取消下达处理方法 - rqrq
  3041. * @param row 当前行数据
  3042. */
  3043. cancelIssueShipmentHandle(row) {
  3044. // 先判断发起人是否有未下达的shipment申请单 - rqrq
  3045. let checkData = {
  3046. site: row.site,
  3047. username: row.username
  3048. }
  3049. checkUserHasUnissueShipment(checkData).then(({ data }) => {
  3050. if (data && data.code === 0) {
  3051. // 如果有未下达的申请单 - rqrq
  3052. if (data.row != null) {
  3053. this.$alert('该用户有未下达的申请单,请先处理', '提示', {
  3054. confirmButtonText: '确定'
  3055. })
  3056. return
  3057. }
  3058. // 没有未下达的申请单,执行取消下达 - rqrq
  3059. this.$confirm(`确定取消下达发货申请单【${row.notifyNo}】吗?`, '提示', {
  3060. confirmButtonText: '确定',
  3061. cancelButtonText: '取消',
  3062. type: 'warning'
  3063. }).then(() => {
  3064. let cancelData = {
  3065. site: row.site,
  3066. notifyNo: row.notifyNo
  3067. }
  3068. cancelIssueShipment(cancelData).then(({ data }) => {
  3069. if (data && data.code === 0) {
  3070. this.$message.success('取消下达成功')
  3071. // 重新加载数据 - rqrq
  3072. this.getDataList()
  3073. } else {
  3074. this.$alert(data.msg, '错误', {
  3075. confirmButtonText: '确定'
  3076. })
  3077. }
  3078. }).catch(() => {
  3079. this.$message.error('取消下达失败')
  3080. })
  3081. }).catch(() => {
  3082. // 用户取消操作 - rqrq
  3083. })
  3084. } else {
  3085. this.$alert(data.msg, '错误', {
  3086. confirmButtonText: '确定'
  3087. })
  3088. }
  3089. }).catch(() => {
  3090. this.$message.error('检查用户申请单失败')
  3091. })
  3092. },
  3093. /**
  3094. * @Description 预览库存发货通知单只考虑立库 - rqrq
  3095. * @param row 当前申请单行数据
  3096. */
  3097. previewInventory(row) {
  3098. this.currentNotifyRow = row
  3099. this.previewDialogVisible = true
  3100. this.previewLoading = true
  3101. this.previewData = []
  3102. let inData = {
  3103. site: row.site,
  3104. notifyNo: row.notifyNo
  3105. }
  3106. checkShipmentInventory(inData).then(({data}) => {
  3107. this.previewLoading = false
  3108. if (data && data.code === 0) {
  3109. this.previewData = data.rows || []
  3110. } else {
  3111. this.$alert(data.msg, '错误', {
  3112. confirmButtonText: '确定'
  3113. })
  3114. }
  3115. }).catch(() => {
  3116. this.previewLoading = false
  3117. this.$message.error('获取库存预览失败')
  3118. })
  3119. },
  3120. /**
  3121. * @Description 推送至WCS发货通知单 - rqrq
  3122. */
  3123. pushToWcs() {
  3124. if (!this.previewData || this.previewData.length === 0) {
  3125. this.$message.warning('没有可推送的数据')
  3126. return
  3127. }
  3128. // 检查是否有满足条件的数据(orderSatisfactionStatus === 1,绿色) - rqrq
  3129. const validData = this.previewData.filter(item => item.orderSatisfactionStatus === 1)
  3130. if (validData.length === 0) {
  3131. this.$message.warning('没有满足库存要求的订单,无法推送')
  3132. return
  3133. }
  3134. this.$confirm('确认推送至WCS?', '提示', {
  3135. confirmButtonText: '确定',
  3136. cancelButtonText: '取消',
  3137. type: 'warning'
  3138. }).then(() => {
  3139. this.pushLoading = true
  3140. let pushData = {
  3141. site: this.currentNotifyRow.site,
  3142. notifyNo: this.currentNotifyRow.notifyNo,
  3143. shipmentInventoryList: this.previewData
  3144. }
  3145. pushShipmentInventoryToWcs(pushData).then(({data}) => {
  3146. if (data && data.code === 0) {
  3147. this.$message({
  3148. message: '推送WCS成功',
  3149. type: 'success',
  3150. duration: 1500
  3151. })
  3152. this.previewDialogVisible = false
  3153. this.getDataList() // 刷新列表
  3154. } else {
  3155. this.$alert(data.msg, '错误', {
  3156. confirmButtonText: '确定'
  3157. })
  3158. }
  3159. }).catch(() => {
  3160. this.$message.error('推送WCS失败')
  3161. }).finally(() => {
  3162. this.pushLoading = false
  3163. })
  3164. }).catch(() => {
  3165. // 用户取消 - rqrq
  3166. })
  3167. },
  3168. /**
  3169. * @Description 表格行样式发货通知单绿色=满足红色=不满足 - rqrq
  3170. */
  3171. getRowStyle({ row }) {
  3172. if (row.orderSatisfactionStatus === 1) {
  3173. return { backgroundColor: '#67C23A20' } // 绿色背景
  3174. } else if (row.orderSatisfactionStatus === 3) {
  3175. return { backgroundColor: '#F56C6C20' } // 红色背景
  3176. }
  3177. return {}
  3178. },
  3179. async handleShipmentRowDblClick(row) {
  3180. const shipmentId = row.soorderNo
  3181. if (!shipmentId) {
  3182. this.$message.warning('该行没有SHIPMENTID')
  3183. return
  3184. }
  3185. this.currentShipmentId = shipmentId
  3186. this.currentReceiverId = ''
  3187. let receiverId = row.receiverId || row.RECEIVER_ID
  3188. if (!receiverId) {
  3189. receiverId = await this.fetchReceiverIdByShipment(shipmentId, row.site)
  3190. }
  3191. if (!receiverId) {
  3192. this.$message.warning('未获取到receiverId')
  3193. }
  3194. this.currentReceiverId = receiverId || ''
  3195. this.loadShipmentLineList(row, true)
  3196. },
  3197. openShipmentLineQueryDialog() {
  3198. this.shipmentLineQueryDialogVisible = true
  3199. },
  3200. resetShipmentLineQueryDialog() {
  3201. this.dialogShipmentId = ''
  3202. },
  3203. async searchShipmentLineByDialog() {
  3204. const shipmentId = (this.dialogShipmentId || '').trim()
  3205. if (!shipmentId) {
  3206. this.$message.warning('请输入SHIPMENT')
  3207. return
  3208. }
  3209. this.currentShipmentId = shipmentId
  3210. this.currentReceiverId = ''
  3211. const site = (this.currentRow && this.currentRow.site) || this.$store.state.user.site
  3212. const receiverId = await this.fetchReceiverIdByShipment(shipmentId, site)
  3213. if (!receiverId) {
  3214. this.$message.warning('未获取到receiverId')
  3215. }
  3216. this.currentReceiverId = receiverId || ''
  3217. this.loadShipmentLineList({ soorderNo: shipmentId, site }, false)
  3218. },
  3219. async fetchReceiverIdByShipment(shipmentId, site) {
  3220. try {
  3221. const querySite = site || (this.currentRow && this.currentRow.site) || this.$store.state.user.site
  3222. const { data } = await getShipmentListForIssure({
  3223. site: querySite,
  3224. orderNo: shipmentId,
  3225. })
  3226. if (data && data.code === 0 && data.rows && data.rows.length > 0) {
  3227. const matched = data.rows.find(item =>
  3228. String(item.SHIPMENT_ID || item.shipmentId) === String(shipmentId)
  3229. ) || data.rows[0]
  3230. return matched.receiverId || matched.RECEIVER_ID || ''
  3231. }
  3232. } catch (e) {
  3233. this.$message.error('获取shipment信息失败')
  3234. }
  3235. return ''
  3236. },
  3237. normalizeShipmentLineRow(row) {
  3238. return {
  3239. shipmentId: row.shipmentId || row.SHIPMENT_ID,
  3240. shipmentLineNo: row.shipmentLineNo != null ? row.shipmentLineNo : row.SHIPMENT_LINE_NO,
  3241. inventoryPartNo: row.inventoryPartNo || row.INVENTORY_PART_NO,
  3242. sourcePartDescription: row.sourcePartDescription || row.SOURCE_PART_DESCRIPTION,
  3243. inventoryQty: row.inventoryQty != null ? row.inventoryQty : row.INVENTORY_QTY,
  3244. qtyAssigned: row.qtyAssigned != null ? row.qtyAssigned : row.QTY_ASSIGNED,
  3245. qtyPicked: row.qtyPicked != null ? row.qtyPicked : row.QTY_PICKED,
  3246. qtyShipped: row.qtyShipped != null ? row.qtyShipped : row.QTY_SHIPPED,
  3247. inventoryUom: row.inventoryUom || row.INVENTORY_UOM,
  3248. sourceRef1: row.sourceRef1 || row.SOURCE_REF1,
  3249. sourceRef2: row.sourceRef2 || row.SOURCE_REF2,
  3250. sourceRef3: row.sourceRef3 || row.SOURCE_REF3,
  3251. }
  3252. },
  3253. loadShipmentLineList(row, switchTab = true) {
  3254. const params = {
  3255. site: row.site || (this.currentRow && this.currentRow.site) || this.$store.state.user.site,
  3256. orderNo: row.soorderNo,
  3257. }
  3258. this.shipmentLineLoading = true
  3259. getShipmentLine(params)
  3260. .then(({ data }) => {
  3261. if (data && data.code === 0) {
  3262. this.shipmentLineList = (data.rows || []).map(item => this.normalizeShipmentLineRow(item))
  3263. if (switchTab) {
  3264. this.activeTable = 'shipmentLinePrint'
  3265. }
  3266. if (this.shipmentLineList.length === 0) {
  3267. this.$message.warning('未查询到ShipmentLine数据')
  3268. }
  3269. } else {
  3270. this.shipmentLineList = []
  3271. this.$message.error(data.msg || '获取ShipmentLine失败')
  3272. }
  3273. })
  3274. .catch(() => {
  3275. this.shipmentLineList = []
  3276. this.$message.error('获取ShipmentLine失败')
  3277. })
  3278. .finally(() => {
  3279. this.shipmentLineLoading = false
  3280. })
  3281. },
  3282. printShipmentLine(row) {
  3283. if (!this.currentReceiverId) {
  3284. this.$message.warning('未获取到receiverId,请先查询SHIPMENT')
  3285. return
  3286. }
  3287. this.printShipmentLineRow = row
  3288. this.resetShipmentLinePrintForm()
  3289. this.printForm.assignQty = row.qtyAssigned != null ? row.qtyAssigned : 0
  3290. this.shipmentLinePrintDialogVisible = true
  3291. },
  3292. resetShipmentLinePrintForm() {
  3293. this.printForm = {
  3294. copies: 1,
  3295. assignQty: 0,
  3296. labelType: '外箱标签',
  3297. reportId: '',
  3298. printerName: '',
  3299. }
  3300. },
  3301. // 红框相关:模板/打印机加载已停用,由后端按 customerId(receiverId) 自动匹配
  3302. // loadShipmentLinePrintOptions(row) { ... }
  3303. // loadLabelTemplateList(row) { ... }
  3304. // loadPrinterList() { ... }
  3305. // handlePrintLabelTypeChange() { ... }
  3306. // handlePrintTemplateChange() { ... }
  3307. buildShipmentLinePrintRequest() {
  3308. const row = this.printShipmentLineRow
  3309. const customFields = {
  3310. QTY: this.printForm.assignQty,
  3311. }
  3312. if (row.inventoryPartNo) {
  3313. customFields.partNo = row.inventoryPartNo
  3314. }
  3315. if (row.sourcePartDescription) {
  3316. customFields.partDesc = row.sourcePartDescription
  3317. }
  3318. const printRequest = {
  3319. reportId: this.printForm.reportId,
  3320. labelType: this.printForm.labelType,
  3321. printerName: this.printForm.printerName,
  3322. copies: this.printForm.copies,
  3323. site: (this.currentRow && this.currentRow.site) || this.$store.state.user.site,
  3324. userId: localStorage.getItem('userName'),
  3325. username: localStorage.getItem('userName'),
  3326. consignmentId: String(row.shipmentId || ''),
  3327. jobNo: String(row.sourceRef1 || ''),
  3328. lineNo: String(row.sourceRef2 || ''),
  3329. relNo: String(row.sourceRef3 || ''),
  3330. lineItemNo: 0,
  3331. customFields,
  3332. }
  3333. // 将 shipment 的 receiverId 作为 customerId 传给打印接口,由后端按客户匹配标签模板
  3334. if (this.currentReceiverId) {
  3335. printRequest.customerId = this.currentReceiverId
  3336. }
  3337. return printRequest
  3338. },
  3339. async confirmShipmentLinePrint() {
  3340. if (!this.canStartShipmentLinePrint) {
  3341. this.$message.warning('请完善打印参数')
  3342. return
  3343. }
  3344. const row = this.printShipmentLineRow
  3345. if (!this.currentReceiverId) {
  3346. this.$message.warning('未获取到receiverId,无法打印')
  3347. return
  3348. }
  3349. if (!row.shipmentId || !row.sourceRef1 || row.sourceRef2 == null || row.sourceRef3 == null || row.shipmentLineNo == null) {
  3350. this.$message.warning('当前行缺少打印所需的IFS参数')
  3351. return
  3352. }
  3353. if (!this.printForm.assignQty || this.printForm.assignQty <= 0) {
  3354. this.$message.warning('分配数量必须大于0')
  3355. return
  3356. }
  3357. this.printLoading = true
  3358. try {
  3359. const printRequest = this.buildShipmentLinePrintRequest()
  3360. const { data } = await printLabelCommon(printRequest)
  3361. if (data && (data.code === 200 || data.code === 0)) {
  3362. this.$message.success(data.msg || '打印任务已发送成功')
  3363. this.shipmentLinePrintDialogVisible = false
  3364. } else {
  3365. this.$message.error((data && data.msg) || '打印失败')
  3366. }
  3367. } catch (error) {
  3368. this.$message.error(`打印失败: ${error.message || error}`)
  3369. } finally {
  3370. this.printLoading = false
  3371. }
  3372. },
  3373. },
  3374. }
  3375. </script>
  3376. <style scoped>
  3377. /deep/ .customer-tab .el-tabs__content {
  3378. padding: 5px !important;
  3379. }
  3380. .shipment-line-print-form .el-form-item {
  3381. margin-bottom: 14px;
  3382. }
  3383. .print-qty-row {
  3384. display: flex;
  3385. align-items: center;
  3386. gap: 20px;
  3387. margin-bottom: 6px;
  3388. }
  3389. .print-qty-item {
  3390. flex: 1;
  3391. display: flex;
  3392. align-items: center;
  3393. min-width: 0;
  3394. }
  3395. .print-qty-label {
  3396. flex-shrink: 0;
  3397. margin-right: 8px;
  3398. font-size: 13px;
  3399. font-weight: 600;
  3400. color: #303133;
  3401. white-space: nowrap;
  3402. }
  3403. .shipment-line-print-form .print-input-number {
  3404. flex: 1;
  3405. width: 0;
  3406. min-width: 110px;
  3407. }
  3408. .shipment-line-print-form .print-input-number /deep/ .el-input {
  3409. width: 100%;
  3410. }
  3411. .shipment-line-print-form .print-input-number /deep/ .el-input__inner {
  3412. height: 32px;
  3413. line-height: 32px;
  3414. padding-left: 10px;
  3415. padding-right: 40px;
  3416. text-align: left;
  3417. }
  3418. .shipment-line-print-form .print-input-number /deep/ .el-input-number__increase,
  3419. .shipment-line-print-form .print-input-number /deep/ .el-input-number__decrease {
  3420. width: 32px;
  3421. height: 16px;
  3422. line-height: 16px;
  3423. font-size: 12px;
  3424. background: #f5f7fa;
  3425. border-left: 1px solid #dcdfe6;
  3426. }
  3427. .shipment-line-print-form .print-input-number /deep/ .el-input-number__increase {
  3428. border-bottom: 1px solid #dcdfe6;
  3429. border-radius: 0 4px 0 0;
  3430. }
  3431. .shipment-line-print-form .print-input-number /deep/ .el-input-number__decrease {
  3432. border-radius: 0 0 4px 0;
  3433. }
  3434. .shipment-line-print-form .print-input-number /deep/ .el-input-number__increase:hover,
  3435. .shipment-line-print-form .print-input-number /deep/ .el-input-number__decrease:hover {
  3436. color: #409eff;
  3437. }
  3438. .shipment-line-print-form .el-form-item__label {
  3439. padding-bottom: 4px;
  3440. line-height: 20px;
  3441. font-weight: 600;
  3442. color: #303133;
  3443. }
  3444. .shipment-line-print-form .form-hint {
  3445. margin: 0 0 14px;
  3446. font-size: 12px;
  3447. color: #909399;
  3448. line-height: 1.4;
  3449. }
  3450. .shipment-line-print-summary {
  3451. display: flex;
  3452. justify-content: space-between;
  3453. padding: 12px 16px;
  3454. background: #ecf5ff;
  3455. border-radius: 4px;
  3456. }
  3457. .shipment-line-print-summary .summary-item {
  3458. text-align: center;
  3459. }
  3460. .shipment-line-print-summary .summary-label {
  3461. display: block;
  3462. font-size: 12px;
  3463. color: #909399;
  3464. margin-bottom: 4px;
  3465. }
  3466. .shipment-line-print-summary .summary-value {
  3467. font-size: 16px;
  3468. font-weight: 600;
  3469. color: #409eff;
  3470. }
  3471. .el-table /deep/ .cell {
  3472. height: auto;
  3473. line-height: 1.5;
  3474. }
  3475. /* rqrq - 匹配条码列自动换行显示 */
  3476. /deep/ .wrap-text-column .cell {
  3477. white-space: normal !important;
  3478. word-break: break-all !important;
  3479. line-height: 1.5 !important;
  3480. }
  3481. </style>