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.

2302 lines
77 KiB

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