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.

2282 lines
76 KiB

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