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.

4027 lines
139 KiB

5 months ago
5 months ago
2 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
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
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
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
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
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
  1. <template>
  2. <div class="mod-config">
  3. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  4. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  5. <el-form-item :label="'申请单号'">
  6. <el-input v-model="searchData.notifyNo" style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'申请账号'">
  9. <el-input v-model="searchData.userName" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item label="状态" >
  12. <el-select v-model="searchData.status" clearable placeholder="请选择" style="width: 120px">
  13. <el-option label="草稿" value="草稿"></el-option>
  14. <el-option label="待确认" value="待确认"></el-option>
  15. <el-option label="待检验" value="待检验"></el-option>
  16. <el-option label="编辑中" value="编辑中"></el-option>
  17. <el-option label="待出库" value="待出库"></el-option>
  18. <el-option label="已完成" value="已完成"></el-option>
  19. <el-option label="已关闭" value="已关闭"></el-option>
  20. <el-option label="已归档" value="已归档"></el-option>
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item :label="'申请单日期'">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.startDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item style="margin-top: 23px;">
  33. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  34. </el-form-item>
  35. <el-form-item :label="' '">
  36. <el-date-picker
  37. style="width: 120px"
  38. v-model="searchData.endDate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="选择日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-form>
  45. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  46. <el-form-item label="是否领料" >
  47. <el-select v-model="searchData.issueFlag" placeholder="请选择" style="width: 120px">
  48. <el-option label="全部" value=""></el-option>
  49. <el-option label="Y" value="Y"></el-option>
  50. <el-option label="N" value="N"></el-option>
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item label="领料结果" >
  54. <el-select v-model="searchData.issueResult" placeholder="请选择" style="width: 120px">
  55. <el-option label="全部" value=""></el-option>
  56. <el-option label="部分发料" value="部分发料"></el-option>
  57. <el-option label="全部发料" value="全部发料"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item :label="' '">
  61. <el-button type="primary" @click="searchTable()">查询</el-button>
  62. <el-button type="primary" @click="createNotifyModal()">新增</el-button>
  63. <download-excel
  64. :fields="fields()"
  65. :data="exportData"
  66. type="xls"
  67. :name="exportName"
  68. :header="exportHeader"
  69. :footer="exportFooter"
  70. :fetch="createExportData"
  71. :before-generate="startDownload"
  72. :before-finish="finishDownload"
  73. worksheet="导出信息"
  74. class="el-button el-button--primary el-button--medium">
  75. {{ '导出' }}
  76. </download-excel>
  77. </el-form-item>
  78. </el-form>
  79. </el-form>
  80. <el-table
  81. :data="dataList"
  82. @row-click="changeData"
  83. :height="height"
  84. border
  85. highlight-current-row
  86. ref="mainTable"
  87. v-loading="dataListLoading"
  88. style="width: 100%; ">
  89. <el-table-column
  90. v-for="(item,index) in columnList1" :key="index"
  91. :sortable="item.columnSortable"
  92. :prop="item.columnProp"
  93. :header-align="item.headerAlign"
  94. :show-overflow-tooltip="item.showOverflowTooltip"
  95. :align="item.align"
  96. :fixed="item.fixed==''?false:item.fixed"
  97. :min-width="item.columnWidth"
  98. :label="item.columnLabel">
  99. <template slot-scope="scope">
  100. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  101. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column
  105. header-align="center"
  106. align="center"
  107. width="140"
  108. label="操作">
  109. <template slot-scope="scope">
  110. <el-link style="cursor: pointer" v-if="scope.row.status==='草稿'" @click="submitNotifyModel(scope.row)">提交</el-link>
  111. <span v-if="scope.row.status==='草稿'"> | </span>
  112. <el-link style="cursor: pointer" v-if="scope.row.status==='待确认' || scope.row.status==='编辑中'" @click="xiadaNotifyModel(scope.row)">下达</el-link>
  113. <el-link style="cursor: pointer" v-if="scope.row.status==='待出库'" @click="editNotifyMaterialFun(scope.row)">编辑</el-link>
  114. <el-link style="cursor: pointer" v-if="scope.row.status!=='已完成' && scope.row.status!=='已关闭' && scope.row.status!=='待出库'" @click="closeNotifyModel(scope.row)">关闭</el-link>
  115. <span v-if="scope.row.status==='草稿'"> | </span>
  116. <el-link style="cursor: pointer" v-if="scope.row.status==='草稿' " @click="deleteNotifyConfirm(scope.row)">删除</el-link>
  117. <!-- <a type="text" size="small" v-if="scope.row.status==='已关闭'" @click="openNotify(scope.row)">开启</a>-->
  118. </template>
  119. </el-table-column>
  120. </el-table>
  121. <el-pagination
  122. @size-change="sizeChangeHandle"
  123. @current-change="currentChangeHandle"
  124. :current-page="pageIndex"
  125. :page-sizes="[20, 50, 100, 1000]"
  126. :page-size="pageSize"
  127. :total="totalPage"
  128. layout="total, sizes, prev, pager, next, jumper">
  129. </el-pagination>
  130. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  131. <el-tab-pane label="申请单明细" name="detail">
  132. <el-form :inline="true" label-position="top" label-width="100px">
  133. <el-button @click="createOrderDetail()" type="primary" style="margin-left: 10px" :disabled="(currentRow.status !== '草稿' && currentRow.status !== '编辑中' && currentRow.status !== '待确认')">{{'新增'}}</el-button>
  134. </el-form>
  135. <el-table
  136. :data="dataList2"
  137. :height="height"
  138. border
  139. v-loading="dataListLoading"
  140. style="width: 100%; ">
  141. <el-table-column
  142. header-align="center"
  143. align="center"
  144. width="60"
  145. label="操作">
  146. <template slot-scope="scope">
  147. <el-link style="cursor: pointer" @click="deleteNotifySOSPlus(scope.row)" :class="{ 'disabled-link': currentRow.status !== '草稿' && currentRow.status !== '编辑中' && currentRow.status !== '待确认' }">删除</el-link>
  148. </template>
  149. </el-table-column>
  150. <el-table-column
  151. v-for="(item,index) in columnList2" :key="index"
  152. :sortable="item.columnSortable"
  153. :prop="item.columnProp"
  154. :header-align="item.headerAlign"
  155. :show-overflow-tooltip="item.showOverflowTooltip"
  156. :align="item.align"
  157. :fixed="item.fixed==''?false:item.fixed"
  158. :min-width="item.columnWidth"
  159. :label="item.columnLabel">
  160. <template slot-scope="scope">
  161. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  162. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  163. </template>
  164. </el-table-column>
  165. </el-table>
  166. </el-tab-pane>
  167. <el-tab-pane label="材料明细" name="sub">
  168. <el-form label-position="top" style="margin-left: 2px;">
  169. <el-button v-if="!editBatchVisible" type="primary" @click="editBatchModel">批量编辑</el-button>
  170. <el-button v-if="!editBatchVisible" type="success" @click="addMaterialModal">新增</el-button>
  171. <el-button v-if="editBatchVisible" type="primary" @click="batchModel" :loading="saveLoading">批量保存</el-button>
  172. </el-form>
  173. <el-table
  174. :data="dataList3"
  175. :height="height"
  176. border
  177. :row-class-name="tableRowClassName"
  178. v-loading="dataListLoading"
  179. style="width: 100%; ">
  180. <el-table-column
  181. v-for="(item,index) in columnList3" :key="index"
  182. :sortable="item.columnSortable"
  183. :prop="item.columnProp"
  184. :header-align="item.headerAlign"
  185. :show-overflow-tooltip="item.showOverflowTooltip"
  186. :align="item.align"
  187. :fixed="item.fixed==''?false:item.fixed"
  188. :min-width="item.columnWidth"
  189. :label="item.columnLabel">
  190. <template slot-scope="scope">
  191. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  192. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  193. </template>
  194. </el-table-column>
  195. <el-table-column
  196. prop="componentScrap"
  197. header-align="center"
  198. align="right"
  199. min-width="100"
  200. label="调机用量">
  201. <template slot-scope="scope">
  202. <span v-if="editBatchVisible">
  203. <el-input :controls="false" v-model="scope.row.componentScrap"
  204. @input="value => { scope.row.componentScrap = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }"
  205. style="height: 11px; width: 98%;">
  206. </el-input>
  207. </span>
  208. <span v-else>
  209. <span>{{scope.row.componentScrap}}</span>
  210. </span>
  211. </template>
  212. </el-table-column>
  213. <el-table-column
  214. prop="firstInspectionQty"
  215. header-align="center"
  216. align="right"
  217. min-width="100"
  218. label="首检用量">
  219. <template slot-scope="scope">
  220. <span v-if="editBatchVisible">
  221. <el-input :controls="false" v-model="scope.row.firstInspectionQty"
  222. @input="value => { scope.row.firstInspectionQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }"
  223. style="height: 11px; width: 98%;">
  224. </el-input>
  225. </span>
  226. <span v-else>
  227. <span>{{scope.row.firstInspectionQty}}</span>
  228. </span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column
  232. prop="standardDosage"
  233. header-align="center"
  234. align="right"
  235. min-width="100"
  236. label="标准用量">
  237. <template slot-scope="scope">
  238. <span v-if="editBatchVisible">
  239. <el-input :controls="false" v-model="scope.row.standardDosage"
  240. @input="value => { scope.row.standardDosage = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }"
  241. style="height: 11px; width: 98%;">
  242. </el-input>
  243. </span>
  244. <span v-else>
  245. <span>{{scope.row.standardDosage}}</span>
  246. </span>
  247. </template>
  248. </el-table-column>
  249. <el-table-column
  250. v-for="(item,index) in columnList3s" :key="index"
  251. :sortable="item.columnSortable"
  252. :prop="item.columnProp"
  253. :header-align="item.headerAlign"
  254. :show-overflow-tooltip="item.showOverflowTooltip"
  255. :align="item.align"
  256. :fixed="item.fixed==''?false:item.fixed"
  257. :min-width="item.columnWidth"
  258. :label="item.columnLabel">
  259. <template slot-scope="scope">
  260. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  261. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  262. </template>
  263. </el-table-column>
  264. <el-table-column
  265. fixed="right"
  266. header-align="center"
  267. align="center"
  268. width="100"
  269. label="操作">
  270. <template slot-scope="scope">
  271. <el-link style="cursor: pointer" @click="getAlternativePart(scope.row)">替代料</el-link>
  272. <el-link style="cursor: pointer;margin-left: 5px;" type="danger" @click="deleteNotifyMaterial(scope.row)">删除</el-link>
  273. </template>
  274. </el-table-column>
  275. </el-table>
  276. </el-tab-pane>
  277. <el-tab-pane label="材料汇总" name="sum">
  278. <el-table
  279. ref="sum"
  280. :data="dataList4"
  281. :height="height+20"
  282. border
  283. v-loading="dataListLoading"
  284. style="width: 100%; ">
  285. <el-table-column
  286. v-for="(item,index) in columnList4" :key="index"
  287. :sortable="item.columnSortable"
  288. :prop="item.columnProp"
  289. :header-align="item.headerAlign"
  290. :show-overflow-tooltip="item.showOverflowTooltip"
  291. :align="item.align"
  292. :fixed="item.fixed==''?false:item.fixed"
  293. :min-width="item.columnWidth"
  294. :label="item.columnLabel">
  295. <template slot-scope="scope">
  296. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  297. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  298. </template>
  299. </el-table-column>
  300. <el-table-column
  301. fixed="right"
  302. header-align="center"
  303. align="center"
  304. width="100"
  305. label="操作">
  306. <template slot-scope="scope">
  307. <el-link style="cursor: pointer;" @click="outboundDetailModal(scope.row)">出库明细</el-link>
  308. </template>
  309. </el-table-column>
  310. </el-table>
  311. </el-tab-pane>
  312. <!-- <el-tab-pane label="删除记录" name="change">-->
  313. <!-- <el-table-->
  314. <!-- :data="dataList5"-->
  315. <!-- :height="height"-->
  316. <!-- border-->
  317. <!-- v-loading="dataListLoading"-->
  318. <!-- style="width: 100%; ">-->
  319. <!-- &lt;!&ndash; <el-table-column&ndash;&gt;-->
  320. <!-- &lt;!&ndash; header-align="center"&ndash;&gt;-->
  321. <!-- &lt;!&ndash; align="center"&ndash;&gt;-->
  322. <!-- &lt;!&ndash; width="80"&ndash;&gt;-->
  323. <!-- &lt;!&ndash; fixed="left"&ndash;&gt;-->
  324. <!-- &lt;!&ndash; label="操作">&ndash;&gt;-->
  325. <!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
  326. <!-- &lt;!&ndash; <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>&ndash;&gt;-->
  327. <!-- &lt;!&ndash; </template>&ndash;&gt;-->
  328. <!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
  329. <!-- <el-table-column-->
  330. <!-- v-for="(item,index) in columnList5" :key="index"-->
  331. <!-- :sortable="item.columnSortable"-->
  332. <!-- :prop="item.columnProp"-->
  333. <!-- :header-align="item.headerAlign"-->
  334. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  335. <!-- :align="item.align"-->
  336. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  337. <!-- :min-width="item.columnWidth"-->
  338. <!-- :label="item.columnLabel">-->
  339. <!-- <template slot-scope="scope">-->
  340. <!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
  341. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  342. <!-- style="width: 100px; height: 80px"/></span>-->
  343. <!-- </template>-->
  344. <!-- </el-table-column>-->
  345. <!-- </el-table>-->
  346. <!-- </el-tab-pane>-->
  347. <!-- <el-tab-pane label="关闭记录" name="close">-->
  348. <!-- <el-table-->
  349. <!-- :data="dataList6"-->
  350. <!-- :height="height"-->
  351. <!-- border-->
  352. <!-- v-loading="dataListLoading"-->
  353. <!-- style="width: 100%; ">-->
  354. <!-- &lt;!&ndash; <el-table-column&ndash;&gt;-->
  355. <!-- &lt;!&ndash; header-align="center"&ndash;&gt;-->
  356. <!-- &lt;!&ndash; align="center"&ndash;&gt;-->
  357. <!-- &lt;!&ndash; width="80"&ndash;&gt;-->
  358. <!-- &lt;!&ndash; fixed="left"&ndash;&gt;-->
  359. <!-- &lt;!&ndash; label="操作">&ndash;&gt;-->
  360. <!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
  361. <!-- &lt;!&ndash; <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>&ndash;&gt;-->
  362. <!-- &lt;!&ndash; </template>&ndash;&gt;-->
  363. <!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
  364. <!-- <el-table-column-->
  365. <!-- v-for="(item,index) in columnList6" :key="index"-->
  366. <!-- :sortable="item.columnSortable"-->
  367. <!-- :prop="item.columnProp"-->
  368. <!-- :header-align="item.headerAlign"-->
  369. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  370. <!-- :align="item.align"-->
  371. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  372. <!-- :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>-->
  381. <!-- </el-tab-pane>-->
  382. </el-tabs>
  383. <el-dialog title="关闭原因" :close-on-click-modal="false" v-drag :visible.sync="closeModalFlag" width="450px">
  384. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  385. <el-row :gutter="20">
  386. <el-col :span="24">
  387. <el-form-item >
  388. <el-input
  389. type="textarea"
  390. v-model="closeData.closeRemark "
  391. :rows="3"
  392. resize='none'
  393. maxlength="200"
  394. show-word-limit
  395. style="height: 60px" >
  396. </el-input>
  397. </el-form-item>
  398. </el-col>
  399. </el-row>
  400. </el-form>
  401. <el-footer style="height:40px;margin-top: 60px;text-align:center">
  402. <el-button type="primary" @click="closeNotify()">保存</el-button>
  403. <el-button type="primary" @click="closeModalFlag=false">关闭</el-button>
  404. </el-footer>
  405. </el-dialog>
  406. <el-dialog title="新建领料申请单" :close-on-click-modal="false" v-drag :visible.sync="createNotifyFlag" width="300px">
  407. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  408. <el-row :gutter="20">
  409. <el-col :span="12">
  410. <el-form-item :label="'工厂_BU'" style="width: 97%">
  411. <el-select v-model="notifyData.bu" placeholder="请选择" style="width: 100%">
  412. <el-option
  413. v-for = "i in userBuList"
  414. :key = "i.buNo"
  415. :label = "i.sitename"
  416. :value = "i.buNo">
  417. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  418. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  419. {{ i.buDesc }}
  420. </span>
  421. </el-option>
  422. </el-select>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="12">
  426. <el-form-item :label="'车间'">
  427. <el-select v-model="notifyData.workCenterNo" clearable placeholder="请选择" style="width: 100%">
  428. <el-option
  429. v-for = "i in workCenterList"
  430. :key = "i.workCenterNo"
  431. :label = "i.workCenterDesc"
  432. :value = "i.workCenterNo">
  433. </el-option>
  434. </el-select>
  435. </el-form-item>
  436. </el-col>
  437. </el-row>
  438. <el-row :gutter="20">
  439. <el-col :span="24">
  440. <el-form-item :label="'备注'" style="width: 97%">
  441. <el-input
  442. type="textarea"
  443. :rows="3"
  444. v-model="notifyData.remark"
  445. style="width: 100%;">
  446. </el-input>
  447. <!-- <el-input type="textarea" v-model="notifyData.remark" style="width: 100%"></el-input>-->
  448. </el-form-item>
  449. </el-col>
  450. </el-row>
  451. </el-form>
  452. <el-footer style="height:35px;margin-top: 55px;text-align:center">
  453. <el-button type="primary" @click="saveNotify()">保存</el-button>
  454. <el-button type="primary" @click="createNotifyFlag=false">关闭</el-button>
  455. </el-footer>
  456. </el-dialog>
  457. <!-- 选择物料模态框 -->
  458. <el-dialog width="1000px"
  459. title="选择物料"
  460. :close-on-click-modal="false"
  461. :visible.sync="choosePartModalFlag">
  462. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  463. <el-row :gutter="20">
  464. <el-col :span="6">
  465. <el-form-item :label="'物料编码'" >
  466. <el-input v-model="choosePartData.partNo"></el-input>
  467. </el-form-item>
  468. </el-col>
  469. <el-col :span="6">
  470. <el-form-item :label="'物料名称'" >
  471. <el-input v-model="choosePartData.partDesc"></el-input>
  472. </el-form-item>
  473. </el-col>
  474. <el-col :span="6">
  475. <el-form-item :label="'规格型号'" >
  476. <el-input v-model="choosePartData.spec"></el-input>
  477. </el-form-item>
  478. </el-col>
  479. <el-col :span="6">
  480. <el-form-item >
  481. <el-button type="primary" @click="searchPartModel" style="margin-top: 5px" class="">查询</el-button>
  482. </el-form-item>
  483. </el-col>
  484. </el-row>
  485. </el-form>
  486. <el-table
  487. :height="400"
  488. :data="choosePartList"
  489. border
  490. style="width: 100%;">
  491. <el-table-column
  492. prop="partNo"
  493. header-align="center"
  494. align="left"
  495. min-width="80"
  496. label="物料编码">
  497. </el-table-column>
  498. <el-table-column
  499. prop="partDesc"
  500. header-align="center"
  501. align="left"
  502. min-width="120"
  503. label="物料描述">
  504. </el-table-column>
  505. <el-table-column
  506. prop="spec"
  507. header-align="center"
  508. align="left"
  509. min-width="120"
  510. label="规格型号">
  511. </el-table-column>
  512. <el-table-column
  513. prop="sku"
  514. header-align="center"
  515. align="left"
  516. min-width="80"
  517. label="SKU">
  518. </el-table-column>
  519. <el-table-column
  520. prop="umid"
  521. header-align="center"
  522. align="left"
  523. min-width="60"
  524. label="计量单位">
  525. </el-table-column>
  526. <el-table-column
  527. fixed="left"
  528. header-align="center"
  529. align="center"
  530. width="60"
  531. label="操作">
  532. <template slot-scope="scope">
  533. <a type="text" size="small" @click="choosePart(scope.row)">选择</a>
  534. </template>
  535. </el-table-column>
  536. </el-table>
  537. <el-pagination
  538. @size-change="pp_sizeChangeHandle"
  539. @current-change="pp_currentChangeHandle"
  540. :current-page="pp_pageIndex"
  541. :page-sizes="[20, 50, 100, 1000]"
  542. :page-size="pp_pageSize"
  543. :total="pp_totalPage"
  544. layout="total, sizes, prev, pager, next, jumper">
  545. </el-pagination>
  546. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  547. <el-button type="primary" @click="choosePartModalFlag=false">关闭</el-button>
  548. </el-footer>
  549. </el-dialog>
  550. <el-dialog title="选择派工单" :close-on-click-modal="false" v-drag :visible.sync="chooseSOSModalFlag" width="1000px">
  551. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  552. <el-row :gutter="20">
  553. <el-col :span="4">
  554. <el-form-item :label="'生产订单'" >
  555. <el-input v-model="chooseSOSData.orderno" ></el-input>
  556. </el-form-item>
  557. </el-col>
  558. <el-col :span="4">
  559. <el-form-item :label="'派工单号'" >
  560. <el-input v-model="chooseSOSData.seqno" ></el-input>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="4">
  564. <el-form-item :label="'机台'" >
  565. <el-input v-model="chooseSOSData.sResourceid" ></el-input>
  566. </el-form-item>
  567. </el-col>
  568. <el-col :span="4">
  569. <el-form-item :label="'派工日期'" >
  570. <el-date-picker
  571. style="width: 100%"
  572. v-model="chooseSOSData.startDate"
  573. type="date"
  574. value-format="yyyy-MM-dd"
  575. placeholder="选择日期">
  576. </el-date-picker>
  577. </el-form-item>
  578. </el-col>
  579. <el-col :span="4">
  580. <el-form-item :label="'到'" >
  581. <el-date-picker
  582. style="width: 100%"
  583. v-model="chooseSOSData.endDate"
  584. type="date"
  585. value-format="yyyy-MM-dd"
  586. placeholder="选择日期">
  587. </el-date-picker>
  588. </el-form-item>
  589. </el-col>
  590. </el-row>
  591. <el-row :gutter="20">
  592. <el-col :span="6">
  593. <el-form-item >
  594. <el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="">查询</el-button>
  595. </el-form-item>
  596. </el-col>
  597. </el-row>
  598. </el-form>
  599. <el-table
  600. :height="400"
  601. :data="chooseSOSList"
  602. border
  603. style="width: 100%;">
  604. <el-table-column
  605. v-for="(item,index) in chooseSOSColumnList" :key="index"
  606. :sortable="item.columnSortable"
  607. :prop="item.columnProp"
  608. :header-align="item.headerAlign"
  609. :show-overflow-tooltip="item.showOverflowTooltip"
  610. :align="item.align"
  611. :fixed="item.fixed==''?false:item.fixed"
  612. :min-width="item.columnWidth"
  613. :label="item.columnLabel">
  614. <template slot-scope="scope">
  615. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  616. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  617. </template>
  618. </el-table-column>
  619. <el-table-column
  620. fixed="left"
  621. header-align="center"
  622. align="center"
  623. width="60"
  624. label="操作">
  625. <template slot-scope="scope">
  626. <a type="text" size="small" @click="chooseSOS(scope.row)">选择</a>
  627. </template>
  628. </el-table-column>
  629. </el-table>
  630. <el-pagination
  631. @size-change="ss_sizeChangeHandle"
  632. @current-change="ss_currentChangeHandle"
  633. :current-page="ss_pageIndex"
  634. :page-sizes="[20, 50, 100, 1000]"
  635. :page-size="ss_pageSize"
  636. :total="ss_totalPage"
  637. layout="total, sizes, prev, pager, next, jumper">
  638. </el-pagination>
  639. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  640. <el-button type="primary" @click="chooseSOSModalFlag = false">关闭</el-button>
  641. </el-footer>
  642. </el-dialog>
  643. <el-dialog title="选择工单" :close-on-click-modal="false" v-drag :visible.sync="chooseOrderModalFlag" width="1000px">
  644. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  645. <el-row :gutter="20">
  646. <el-col :span="6">
  647. <el-form-item :label="'生产订单'" >
  648. <el-input v-model="chooseOrderData.orderNo"></el-input>
  649. </el-form-item>
  650. </el-col>
  651. <el-col :span="6">
  652. <el-form-item :label="'工单状态'" >
  653. <el-select multiple collapse-tags v-model="chooseOrderData.statusList" clearable style="width: 220px">
  654. <el-option label="全部" value=""></el-option>
  655. <el-option label="已停工" value="已停工"></el-option>
  656. <el-option label="已开工" value="已开工"></el-option>
  657. <el-option label="已取消" value="已取消"></el-option>
  658. <el-option label="已计划" value="已计划"></el-option>
  659. <el-option label="已排产" value="已排产"></el-option>
  660. <el-option label="已下达" value="已下达"></el-option>
  661. <el-option label="已关闭" value="已关闭"></el-option>
  662. </el-select>
  663. </el-form-item>
  664. </el-col>
  665. <el-col :span="6">
  666. <el-form-item :label="'开始日期'" >
  667. <el-date-picker
  668. style="width: 100%"
  669. v-model="chooseOrderData.date3"
  670. type="date"
  671. value-format="yyyy-MM-dd"
  672. placeholder="选择日期">
  673. </el-date-picker>
  674. </el-form-item>
  675. </el-col>
  676. <el-col :span="6">
  677. <el-form-item :label="'结束日期'" >
  678. <el-date-picker
  679. style="width: 100%"
  680. v-model="chooseOrderData.date4"
  681. type="date"
  682. value-format="yyyy-MM-dd"
  683. placeholder="选择日期">
  684. </el-date-picker>
  685. </el-form-item>
  686. </el-col>
  687. </el-row>
  688. <el-row :gutter="20">
  689. <el-col :span="6">
  690. <el-form-item >
  691. <el-button type="primary" @click="searchOrder()" style="margin-top: 5px" class="">查询</el-button>
  692. </el-form-item>
  693. </el-col>
  694. </el-row>
  695. </el-form>
  696. <el-table
  697. :height="400"
  698. :data="chooseOrderList"
  699. border
  700. style="width: 100%;">
  701. <el-table-column
  702. v-for="(item,index) in chooseOrderColumnList" :key="index"
  703. :sortable="item.columnSortable"
  704. :prop="item.columnProp"
  705. :header-align="item.headerAlign"
  706. :show-overflow-tooltip="item.showOverflowTooltip"
  707. :align="item.align"
  708. :fixed="item.fixed==''?false:item.fixed"
  709. :min-width="item.columnWidth"
  710. :label="item.columnLabel">
  711. <template slot-scope="scope">
  712. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  713. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  714. </template>
  715. </el-table-column>
  716. <el-table-column
  717. fixed="left"
  718. header-align="center"
  719. align="center"
  720. width="60"
  721. label="操作">
  722. <template slot-scope="scope">
  723. <a type="text" size="small" @click="chooseOrder(scope.row)">选择</a>
  724. </template>
  725. </el-table-column>
  726. </el-table>
  727. <el-pagination
  728. @size-change="co_sizeChangeHandle"
  729. @current-change="co_currentChangeHandle"
  730. :current-page="co_pageIndex"
  731. :page-sizes="[20, 50, 100, 1000]"
  732. :page-size="co_pageSize"
  733. :total="co_totalPage"
  734. layout="total, sizes, prev, pager, next, jumper">
  735. </el-pagination>
  736. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  737. <el-button type="primary" @click="chooseOrderModalFlag = false">关闭</el-button>
  738. </el-footer>
  739. </el-dialog>
  740. <el-dialog title="选择工序" :close-on-click-modal="false" v-drag :visible.sync="chooseOperationModalFlag" width="800px">
  741. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  742. <el-row :gutter="20">
  743. <el-col :span="6">
  744. <el-form-item :label="'工序名称'" >
  745. <el-input v-model="chooseOperationData.itemDesc"></el-input>
  746. </el-form-item>
  747. </el-col>
  748. <el-col :span="6">
  749. <el-form-item >
  750. <el-button type="primary" @click="searchOperation()" style="margin-top: 5px" class="">查询</el-button>
  751. </el-form-item>
  752. </el-col>
  753. </el-row>
  754. </el-form>
  755. <el-table
  756. :height="400"
  757. :data="chooseOperationList"
  758. border
  759. style="width: 100%;">
  760. <el-table-column
  761. v-for="(item,index) in chooseOperationColumnList" :key="index"
  762. :sortable="item.columnSortable"
  763. :prop="item.columnProp"
  764. :header-align="item.headerAlign"
  765. :show-overflow-tooltip="item.showOverflowTooltip"
  766. :align="item.align"
  767. :fixed="item.fixed==''?false:item.fixed"
  768. :min-width="item.columnWidth"
  769. :label="item.columnLabel">
  770. <template slot-scope="scope">
  771. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  772. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  773. </template>
  774. </el-table-column>
  775. <el-table-column
  776. fixed="left"
  777. header-align="center"
  778. align="center"
  779. width="60"
  780. label="操作">
  781. <template slot-scope="scope">
  782. <a type="text" size="small" @click="chooseOperation(scope.row)">选择</a>
  783. </template>
  784. </el-table-column>
  785. </el-table>
  786. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  787. <el-button type="primary" @click="chooseOperationModalFlag = false">关闭</el-button>
  788. </el-footer>
  789. </el-dialog>
  790. <el-dialog title="选择机台" :close-on-click-modal="false" v-drag :visible.sync="chooseResourceModalFlag" width="800px">
  791. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  792. <el-row :gutter="20">
  793. <el-col :span="6">
  794. <el-form-item :label="'机台编号'" >
  795. <el-input v-model="chooseResourceData.resourceId"></el-input>
  796. </el-form-item>
  797. </el-col>
  798. <el-col :span="6">
  799. <el-form-item :label="'机台描述'" >
  800. <el-input v-model="chooseResourceData.resourceDesc"></el-input>
  801. </el-form-item>
  802. </el-col>
  803. <el-col :span="6">
  804. <el-form-item >
  805. <el-button type="primary" @click="searchResource()" style="margin-top: 5px" class="">查询</el-button>
  806. </el-form-item>
  807. </el-col>
  808. </el-row>
  809. </el-form>
  810. <el-table
  811. :height="400"
  812. :data="chooseResourceList"
  813. border
  814. style="width: 100%;">
  815. <el-table-column
  816. v-for="(item,index) in chooseResourceColumnList" :key="index"
  817. :sortable="item.columnSortable"
  818. :prop="item.columnProp"
  819. :header-align="item.headerAlign"
  820. :show-overflow-tooltip="item.showOverflowTooltip"
  821. :align="item.align"
  822. :fixed="item.fixed==''?false:item.fixed"
  823. :min-width="item.columnWidth"
  824. :label="item.columnLabel">
  825. <template slot-scope="scope">
  826. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  827. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  828. </template>
  829. </el-table-column>
  830. <el-table-column
  831. fixed="left"
  832. header-align="center"
  833. align="center"
  834. width="60"
  835. label="操作">
  836. <template slot-scope="scope">
  837. <a type="text" size="small" @click="chooseResource(scope.row)">选择</a>
  838. </template>
  839. </el-table-column>
  840. </el-table>
  841. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  842. <el-button type="primary" @click="chooseResourceModalFlag = false">关闭</el-button>
  843. </el-footer>
  844. </el-dialog>
  845. <el-dialog title="申请单明细" :close-on-click-modal="false" v-drag :visible.sync="saveOrderDetailFlag" width="750px">
  846. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  847. <!-- BOM物料和非BOM物料选择 -->
  848. <el-row :gutter="20" style="margin-bottom: 15px;">
  849. <el-col :span="24">
  850. <el-form-item :label="'物料类型'" style="display: none;">
  851. <el-radio-group v-model="orderDetailData.materialType" @change="onMaterialTypeChange">
  852. <el-radio label="BOM物料">BOM物料</el-radio>
  853. <el-radio label="非BOM物料">非BOM物料</el-radio>
  854. </el-radio-group>
  855. </el-form-item>
  856. </el-col>
  857. </el-row>
  858. <el-row :gutter="20">
  859. <el-col :span="6">
  860. <el-form-item>
  861. <template slot="label">
  862. <span v-if="orderDetailData.materialType === '非BOM物料'" slot="label">生产订单</span>
  863. <span v-else style="cursor: pointer" slot="label" @click="openChooseOrderModal"><a>生产订单</a></span>
  864. </template>
  865. <el-input v-model="orderDetailData.orderNo" disabled placeholder="请选择生产订单"></el-input>
  866. </el-form-item>
  867. </el-col>
  868. <el-col :span="6">
  869. <el-form-item>
  870. <template slot="label">
  871. <span v-if="orderDetailData.materialType === '非BOM物料'" slot="label">派工单号</span>
  872. <span v-else style="cursor: pointer" slot="label" @click="openChooseSOSModal"><a>派工单号</a></span>
  873. </template>
  874. <el-input v-model="orderDetailData.seqNo" disabled></el-input>
  875. </el-form-item>
  876. </el-col>
  877. <el-col :span="6">
  878. <el-form-item>
  879. <template slot="label">
  880. <span v-if="orderDetailData.orderNo && !orderDetailData.seqNo" style="cursor: pointer" slot="label" @click="openChooseOperationModal"><a>工序名称</a></span>
  881. <span v-else slot="label">工序名称</span>
  882. </template>
  883. <el-input v-model="orderDetailData.itemDesc" disabled placeholder="请选择工序"></el-input>
  884. </el-form-item>
  885. </el-col>
  886. <el-col :span="6">
  887. <el-form-item>
  888. <template slot="label">
  889. <span v-if="orderDetailData.orderNo && !orderDetailData.seqNo" style="cursor: pointer" slot="label" @click="openChooseResourceModal"><a>机台</a></span>
  890. <span v-else slot="label">机台</span>
  891. </template>
  892. <el-input v-model="orderDetailData.resourceDesc" disabled placeholder="请选择机台"></el-input>
  893. </el-form-item>
  894. </el-col>
  895. </el-row>
  896. <el-row :gutter="20">
  897. <el-col :span="6">
  898. <el-form-item>
  899. <template slot="label">
  900. <span v-if="orderDetailData.materialType === 'BOM物料'" slot="label">物料编码</span>
  901. <span v-else style="cursor: pointer" slot="label" @click="openChoosePartModal"><a>物料编码</a></span>
  902. </template>
  903. <el-input v-model="orderDetailData.partNo" disabled></el-input>
  904. </el-form-item>
  905. </el-col>
  906. <el-col :span="18">
  907. <el-form-item :label="'物料描述'" style="display: block">
  908. <el-input v-model="orderDetailData.partDesc" disabled></el-input>
  909. </el-form-item>
  910. </el-col>
  911. </el-row>
  912. <el-row :gutter="20">
  913. <el-col :span="4">
  914. <el-form-item :label="'工单/派工数量'">
  915. <el-input v-model="orderDetailData.qtyRequired" disabled style="text-align: right"
  916. class="text-right"></el-input>
  917. </el-form-item>
  918. </el-col>
  919. <el-col :span="4">
  920. <el-form-item :label="'此次领料数量'">
  921. <el-input-number v-model="orderDetailData.issureQty" style="line-height: 20px;padding: 0;width: 100%"
  922. :controls="false" :step="0" :min="0" class="text-right"></el-input-number>
  923. </el-form-item>
  924. </el-col>
  925. <el-col :span="6">
  926. <el-form-item :label="'要求发料时间'">
  927. <el-date-picker
  928. style="width: 100%"
  929. v-model="orderDetailData.needDate"
  930. type="datetime"
  931. value-format="yyyy-MM-dd HH:mm:ss"
  932. placeholder="选择日期">
  933. </el-date-picker>
  934. </el-form-item>
  935. </el-col>
  936. <el-col :span="10">
  937. <el-form-item style="margin-top: 17px">
  938. <span style="line-height: 32px;font-size: 12px;">
  939. 已排产未开工机台数<span style="color: rgb(38, 92, 147);font-weight: bold;">{{ orderDetailData.notYetStartedResourceTotal || 0 }}</span>
  940. <span style="margin-left: 15px;">已排产机台总数<span style="color: rgb(38, 92, 147);font-weight: bold;">{{ orderDetailData.apsResourceTotal || 0 }}</span></span>
  941. </span>
  942. </el-form-item>
  943. </el-col>
  944. </el-row>
  945. </el-form>
  946. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  947. <el-button type="primary" @click="saveIssueNoOrderDetail()">保存</el-button>
  948. <el-button type="primary" @click="saveOrderDetailFlag=false">关闭</el-button>
  949. </el-footer>
  950. </el-dialog>
  951. <!-- 出库明细 -->
  952. <el-dialog title="出库明细" :close-on-click-modal="false" v-drag :visible.sync="detailModal2" width="900px">
  953. <el-table
  954. height="400px"
  955. :data="detailList2"
  956. border
  957. style="width: 100%;">
  958. <el-table-column
  959. v-for="(item,index) in columnDetailList2" :key="index"
  960. :sortable="item.columnSortable"
  961. :prop="item.columnProp"
  962. :header-align="item.headerAlign"
  963. :show-overflow-tooltip="item.showOverflowTooltip"
  964. :align="item.align"
  965. :fixed="item.fixed===''?false:item.fixed"
  966. :min-width="item.columnWidth"
  967. :label="item.columnLabel">
  968. </el-table-column>
  969. </el-table>
  970. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  971. <el-button type="primary" @click="detailModal2 = false">关闭</el-button>
  972. </el-footer>
  973. </el-dialog>
  974. <!-- 新增材料模态框 -->
  975. <el-dialog title="新增材料明细" :close-on-click-modal="false" v-drag :visible.sync="addMaterialModalFlag" width="525px">
  976. <el-form :inline="true" label-position="top" :model="newMaterialData" style="margin-left: 7px;margin-top: -5px;">
  977. <el-form-item>
  978. <span style="cursor: pointer" slot="label" @click="getBaseList(508)"><a href="#">物料信息</a></span>
  979. <el-input v-model="newMaterialData.componentPartNo" @change="partBlur(508)" style="width: 120px"></el-input>
  980. <el-input v-model="newMaterialData.partDesc" disabled style="width: 362px"></el-input>
  981. </el-form-item>
  982. </el-form>
  983. <el-form :inline="true" label-position="top" :model="newMaterialData" style="margin-left: 7px">
  984. <el-form-item label="生产订单">
  985. <el-select v-model="newMaterialData.orderNo" @change="onOrderNoChange" placeholder="请选择生产订单" style="width: 215px">
  986. <el-option
  987. v-for="item in orderOptions"
  988. :key="item.orderNo"
  989. :label="item.orderNo"
  990. :value="item.orderNo">
  991. </el-option>
  992. </el-select>
  993. </el-form-item>
  994. <el-form-item label="申请单序号">
  995. <el-input v-model="newMaterialData.itemNo" disabled style="width: 122px"></el-input>
  996. </el-form-item>
  997. <el-form-item label="类型">
  998. <el-input v-model="newMaterialData.issueType" value="替代料" disabled style="width: 122px"></el-input>
  999. </el-form-item>
  1000. </el-form>
  1001. <el-form :inline="true" label-position="top" :model="newMaterialData" style="margin-left: 7px">
  1002. <el-form-item label="调机量">
  1003. <el-input-number :controls="false" :step="0" v-model="newMaterialData.componentScrap" :min="0" style="width: 152px"></el-input-number>
  1004. </el-form-item>
  1005. <el-form-item label="首检量">
  1006. <el-input-number :controls="false" :step="0" v-model="newMaterialData.firstInspectionQty" :min="0" style="width: 152px"></el-input-number>
  1007. </el-form-item>
  1008. <el-form-item label="标准用量">
  1009. <el-input-number :controls="false" :step="0" v-model="newMaterialData.standardDosage" :min="0" style="width: 152px"></el-input-number>
  1010. </el-form-item>
  1011. </el-form>
  1012. <el-form :inline="true" label-position="top" style="margin-left: 7px">
  1013. <el-form-item :label="'备注'">
  1014. <el-input type="textarea" v-model="newMaterialData.remark" :rows="3" resize='none' show-word-limit style="width: 485px;height: 20px"></el-input>
  1015. </el-form-item>
  1016. </el-form>
  1017. <el-footer style="height:35px;margin-top: 55px;text-align:center">
  1018. <el-button type="primary" @click="saveNewMaterial">保存</el-button>
  1019. <el-button type="primary" @click="addMaterialModalFlag=false">取消</el-button>
  1020. </el-footer>
  1021. </el-dialog>
  1022. <!-- 替代料模态框 -->
  1023. <el-dialog title="替代料列表" :close-on-click-modal="false" v-drag :visible.sync="alternativePartsModalFlag" width="900px">
  1024. <el-table
  1025. :data="alternativePartsList"
  1026. border
  1027. v-loading="alternativePartsLoading"
  1028. style="width: 100%;"
  1029. height="400">
  1030. <!-- <el-table-column prop="partNo" label="母件编码" align="center" min-width="120"></el-table-column>-->
  1031. <!-- <el-table-column prop="partDesc" label="母件名称" align="left" min-width="150" show-overflow-tooltip></el-table-column>-->
  1032. <!-- <el-table-column prop="componentPartNo" label="子件编码" align="center" min-width="120"></el-table-column>-->
  1033. <!-- <el-table-column prop="componentPartDesc" label="子件名称" align="left" min-width="150" show-overflow-tooltip></el-table-column>-->
  1034. <el-table-column prop="alternativePartNo" label="替代料编码" align="left" min-width="120"></el-table-column>
  1035. <el-table-column prop="alternativePartDesc" label="替代料名称" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  1036. <el-table-column prop="replacementRatio" label="替代比例" align="right" min-width="100"></el-table-column>
  1037. <el-table-column prop="priority" label="优先级" align="right" min-width="80"></el-table-column>
  1038. </el-table>
  1039. <span slot="footer" class="dialog-footer">
  1040. <el-button @click="alternativePartsModalFlag = false">关闭</el-button>
  1041. </span>
  1042. </el-dialog>
  1043. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  1044. </div>
  1045. </template>
  1046. <script>
  1047. import {
  1048. searchNotifyHeader
  1049. , searchNotifyOrderList
  1050. , searchNotifyMaterialList
  1051. , searchSumNotifyMaterialList
  1052. , deleteNotifySOSPlus
  1053. , updateNotifyStatus
  1054. , deleteNotifyMaterial
  1055. , searchNotifyLog
  1056. , searchNotifyLogClose
  1057. , getSiteAndBuByUserName
  1058. , createNotify
  1059. , getSOScheduledRoutingListForIssureByPaging
  1060. , getPartListByPaging
  1061. , xiadaNotify
  1062. , editNotifyMaterial
  1063. , deleteNotify,
  1064. updateNotifyDetail,
  1065. saveSOIssueNotifyOrderMateria,
  1066. getBomAlternativeParts,
  1067. getWorkCenterList
  1068. } from "@/api/orderIssure/soIssueNotify.js"
  1069. import {
  1070. searchShopOrderByPaging
  1071. , getRouteInShopOrder
  1072. } from "@/api/shopOrder/shopOrder.js"
  1073. import {
  1074. searchAllResource
  1075. } from "@/api/base/site.js"
  1076. import {
  1077. getTableDefaultListLanguage,
  1078. getTableUserListLanguage,
  1079. } from "@/api/table.js"
  1080. import {saveIssueNoOrderDetail} from "../../../../api/orderIssure/soIssueNotify";
  1081. import {
  1082. getOutboundDetail2, // 获取出库明细
  1083. } from "@/api/qc/outbound_notification.js"
  1084. import Chooselist from '@/views/modules/common/Chooselist_eam'
  1085. import {verifyData} from "@/api/chooselist/chooselist.js"
  1086. export default {
  1087. components: {
  1088. Chooselist,
  1089. },
  1090. data() {
  1091. return {
  1092. height:200,
  1093. activeName: 'detail',
  1094. dataList: [],
  1095. dataList2: [],
  1096. dataList3: [],
  1097. dataList4: [],
  1098. dataList5: [],
  1099. dataList6: [],
  1100. userBuList:[],
  1101. workCenterList: [],
  1102. createNotifyFlag: false,
  1103. saveOrderDetailFlag: false,
  1104. closeData:{
  1105. site:'',
  1106. notifyNo:'',
  1107. closeRemark:'',
  1108. username:this.$store.state.user.name,
  1109. },
  1110. closeModalFlag:false,
  1111. addMaterialModalFlag: false,
  1112. newMaterialData: {
  1113. componentPartNo: '',
  1114. partDesc: '',
  1115. issueType: '替代料',
  1116. orderNo: '',
  1117. itemNo: '',
  1118. remark: '',
  1119. componentScrap: 0,
  1120. firstInspectionQty: 0,
  1121. standardDosage: 0,
  1122. bomSeqNo: '',
  1123. warehouseId: '',
  1124. qtyToIssueOriginal: ''
  1125. },
  1126. alternativePartsModalFlag: false,
  1127. alternativePartsList: [],
  1128. alternativePartsLoading: false,
  1129. orderOptions: [],
  1130. searchData: {
  1131. page: 1,
  1132. limit: 100,
  1133. site: '',
  1134. userName: '',
  1135. notifyNo: '',
  1136. status: '草稿',
  1137. issueFlag: '',
  1138. loginUserName: this.$store.state.user.name,
  1139. issueResult: '',
  1140. startDate: '',
  1141. endDate: '',
  1142. sql: "",
  1143. },
  1144. notifyData:{
  1145. site: '',
  1146. bu: '',
  1147. notifyNo: '',
  1148. notifyDate: '',
  1149. enteredDate: '',
  1150. userName: this.$store.state.user.name,
  1151. userDisplay: '',
  1152. remark: '',
  1153. planIssueDate: '',
  1154. workCenterNo: ''
  1155. },
  1156. pageIndex: 1,
  1157. pageSize: 100,
  1158. totalPage: 0,
  1159. //工单分页
  1160. co_pageIndex: 1,
  1161. co_pageSize: 100,
  1162. co_totalPage: 0,
  1163. //派工单分页
  1164. ss_pageIndex: 1,
  1165. ss_pageSize: 100,
  1166. ss_totalPage: 0,
  1167. //非BOM物料分页
  1168. pp_pageIndex: 1,
  1169. pp_pageSize: 100,
  1170. pp_totalPage: 0,
  1171. dataListLoading: false,
  1172. currentRow:'',
  1173. columnList1:[
  1174. {
  1175. userId: this.$store.state.user.name,
  1176. functionId: 701002,
  1177. serialNumber: '701002Table1NotifyNo',
  1178. tableId: "701002Table1",
  1179. tableName: "领料申请主表",
  1180. columnProp: "notifyNo",
  1181. headerAlign: "center",
  1182. align: "center",
  1183. columnLabel: "申请单单号",
  1184. columnHidden: false,
  1185. columnImage: false,
  1186. columnSortable: false,
  1187. sortLv: 0,
  1188. status: true,
  1189. fixed: '',
  1190. columnWidth: 100
  1191. },{
  1192. userId: this.$store.state.user.name,
  1193. functionId: 701002,
  1194. serialNumber: '701002Table1Bu',
  1195. tableId: "701002Table1",
  1196. tableName: "领料申请主表",
  1197. columnProp: "bu",
  1198. headerAlign: "center",
  1199. align: "center",
  1200. columnLabel: "BU",
  1201. columnHidden: false,
  1202. columnImage: false,
  1203. columnSortable: false,
  1204. sortLv: 0,
  1205. status: true,
  1206. fixed: '',
  1207. columnWidth: 100
  1208. },{
  1209. userId: this.$store.state.user.name,
  1210. functionId: 701002,
  1211. serialNumber: '701002Table1NotifyDate',
  1212. tableId: "701002Table1",
  1213. tableName: "领料申请主表",
  1214. columnProp: "notifyDate",
  1215. headerAlign: "center",
  1216. align: "center",
  1217. columnLabel: "申请日期",
  1218. columnHidden: false,
  1219. columnImage: false,
  1220. columnSortable: false,
  1221. sortLv: 0,
  1222. status: true,
  1223. fixed: '',
  1224. columnWidth: 100
  1225. },{
  1226. userId: this.$store.state.user.name,
  1227. functionId: 701002,
  1228. serialNumber: '701002Table1UserName',
  1229. tableId: "701002Table1",
  1230. tableName: "领料申请主表",
  1231. columnProp: "userName",
  1232. headerAlign: "center",
  1233. align: "left",
  1234. columnLabel: "申请账号",
  1235. columnHidden: false,
  1236. columnImage: false,
  1237. columnSortable: false,
  1238. sortLv: 0,
  1239. status: true,
  1240. fixed: '',
  1241. columnWidth: 100
  1242. },{
  1243. userId: this.$store.state.user.name,
  1244. functionId: 701002,
  1245. serialNumber: '701002Table1UserDisplay',
  1246. tableId: "701002Table1",
  1247. tableName: "领料申请主表",
  1248. columnProp: "userDisplay",
  1249. headerAlign: "center",
  1250. align: "left",
  1251. columnLabel: "申请人姓名",
  1252. columnHidden: false,
  1253. columnImage: false,
  1254. columnSortable: false,
  1255. sortLv: 0,
  1256. status: true,
  1257. fixed: '',
  1258. columnWidth: 100
  1259. },{
  1260. userId: this.$store.state.user.name,
  1261. functionId: 701002,
  1262. serialNumber: '701002Table1IssueFlag',
  1263. tableId: "701002Table1",
  1264. tableName: "领料申请主表",
  1265. columnProp: "issueFlag",
  1266. headerAlign: "center",
  1267. align: "center",
  1268. columnLabel: "是否领料",
  1269. columnHidden: false,
  1270. columnImage: false,
  1271. columnSortable: false,
  1272. sortLv: 0,
  1273. status: true,
  1274. fixed: '',
  1275. columnWidth: 60
  1276. },{
  1277. userId: this.$store.state.user.name,
  1278. functionId: 701002,
  1279. serialNumber: '701002Table1IssueResult',
  1280. tableId: "701002Table1",
  1281. tableName: "领料申请主表",
  1282. columnProp: "issueResult",
  1283. headerAlign: "center",
  1284. align: "left",
  1285. columnLabel: "领料结果",
  1286. columnHidden: false,
  1287. columnImage: false,
  1288. columnSortable: false,
  1289. sortLv: 0,
  1290. status: true,
  1291. fixed: '',
  1292. columnWidth: 120
  1293. },{
  1294. userId: this.$store.state.user.name,
  1295. functionId: 701002,
  1296. serialNumber: '701002Table1Status',
  1297. tableId: "701002Table1",
  1298. tableName: "领料申请主表",
  1299. columnProp: "status",
  1300. headerAlign: "center",
  1301. align: "left",
  1302. columnLabel: "状态",
  1303. columnHidden: false,
  1304. columnImage: false,
  1305. columnSortable: false,
  1306. sortLv: 0,
  1307. status: true,
  1308. fixed: '',
  1309. columnWidth: 80
  1310. },{
  1311. userId: this.$store.state.user.name,
  1312. functionId: 701002,
  1313. serialNumber: '701002Table1Remark',
  1314. tableId: "701002Table1",
  1315. tableName: "领料申请主表",
  1316. columnProp: "remark",
  1317. headerAlign: "center",
  1318. align: "left",
  1319. columnLabel: "备注",
  1320. columnHidden: false,
  1321. columnImage: false,
  1322. columnSortable: false,
  1323. sortLv: 0,
  1324. status: true,
  1325. fixed: '',
  1326. columnWidth: 200
  1327. },
  1328. ],
  1329. columnList2:[
  1330. {
  1331. userId: this.$store.state.user.name,
  1332. functionId: 701002,
  1333. serialNumber: '701002Table2ItemNo',
  1334. tableId: "701002Table2",
  1335. tableName: "申请单工单信息明细表",
  1336. columnProp: "itemNo",
  1337. headerAlign: "center",
  1338. align: "right",
  1339. columnLabel: "序号",
  1340. columnHidden: false,
  1341. columnImage: false,
  1342. columnSortable: false,
  1343. sortLv: 0,
  1344. status: true,
  1345. fixed: '',
  1346. columnWidth: 40
  1347. },
  1348. {
  1349. userId: this.$store.state.user.name,
  1350. functionId: 701002,
  1351. serialNumber: '701002Table2NeedDate',
  1352. tableId: "701002Table2",
  1353. tableName: "申请单工单信息明细表",
  1354. columnProp: 'needDate',
  1355. headerAlign: "center",
  1356. align: "center",
  1357. columnLabel: '要求发料日期',
  1358. columnHidden: false,
  1359. columnImage: false,
  1360. columnSortable: false,
  1361. sortLv: 0,
  1362. status: true,
  1363. fixed: '',
  1364. columnWidth: 100,
  1365. },{
  1366. userId: this.$store.state.user.name,
  1367. functionId: 701002,
  1368. serialNumber: '701002Table2SOOrderNo',
  1369. tableId: "701002Table2",
  1370. tableName: "申请单工单信息明细表",
  1371. columnProp: "sOOrderNo",
  1372. headerAlign: "center",
  1373. align: "left",
  1374. columnLabel: "生产订单",
  1375. columnHidden: false,
  1376. columnImage: false,
  1377. columnSortable: false,
  1378. sortLv: 0,
  1379. status: true,
  1380. fixed: '',
  1381. columnWidth: 120
  1382. },{
  1383. userId: this.$store.state.user.name,
  1384. functionId: 701002,
  1385. serialNumber: '701002Table2OpsItemNo',
  1386. tableId: "701002Table2",
  1387. tableName: "申请单工单信息明细表",
  1388. columnProp: "opsItemNo",
  1389. headerAlign: "center",
  1390. align: "right",
  1391. columnLabel: "工序",
  1392. columnHidden: false,
  1393. columnImage: false,
  1394. columnSortable: false,
  1395. sortLv: 0,
  1396. status: true,
  1397. fixed: '',
  1398. columnWidth: 50
  1399. },{
  1400. userId: this.$store.state.user.name,
  1401. functionId: 701002,
  1402. serialNumber: '701002Table2ItemDesc',
  1403. tableId: "701002Table2",
  1404. tableName: "申请单工单信息明细表",
  1405. columnProp: "itemDesc",
  1406. headerAlign: "center",
  1407. align: "left",
  1408. columnLabel: "工序名称",
  1409. columnHidden: false,
  1410. columnImage: false,
  1411. columnSortable: false,
  1412. sortLv: 0,
  1413. status: true,
  1414. fixed: '',
  1415. columnWidth: 120
  1416. },{
  1417. userId: this.$store.state.user.name,
  1418. functionId: 701002,
  1419. serialNumber: '701002Table2SeqNo',
  1420. tableId: "701002Table2",
  1421. tableName: "申请单工单信息明细表",
  1422. columnProp: "seqNo",
  1423. headerAlign: "center",
  1424. align: "left",
  1425. columnLabel: "派工单号",
  1426. columnHidden: false,
  1427. columnImage: false,
  1428. columnSortable: false,
  1429. sortLv: 0,
  1430. status: true,
  1431. fixed: '',
  1432. columnWidth: 150
  1433. }, {
  1434. userId: this.$store.state.user.name,
  1435. functionId: 701002,
  1436. serialNumber: '701002Table2FGPartNo',
  1437. tableId: "701002Table2",
  1438. tableName: "申请单工单信息明细表",
  1439. columnProp: "fGPartNo",
  1440. headerAlign: "center",
  1441. align: "left",
  1442. columnLabel: "派工单物料",
  1443. columnHidden: false,
  1444. columnImage: false,
  1445. columnSortable: false,
  1446. sortLv: 0,
  1447. status: true,
  1448. fixed: '',
  1449. columnWidth: 120
  1450. }, {
  1451. userId: this.$store.state.user.name,
  1452. functionId: 701002,
  1453. serialNumber: '701002Table2PartDesc',
  1454. tableId: "701002Table2",
  1455. tableName: "申请单工单信息明细表",
  1456. columnProp: "partDesc",
  1457. headerAlign: "center",
  1458. align: "left",
  1459. columnLabel: "物料名称",
  1460. columnHidden: false,
  1461. columnImage: false,
  1462. columnSortable: false,
  1463. sortLv: 0,
  1464. status: true,
  1465. fixed: '',
  1466. columnWidth: 300
  1467. },
  1468. {
  1469. userId: this.$store.state.user.name,
  1470. functionId: 701002,
  1471. serialNumber: '701002Table2ResourceId',
  1472. tableId: "701002Table2",
  1473. tableName: "申请单工单信息明细表",
  1474. columnProp: 'resourceId',
  1475. headerAlign: "center",
  1476. align: "left",
  1477. columnLabel: '机台',
  1478. columnHidden: false,
  1479. columnImage: false,
  1480. columnSortable: false,
  1481. sortLv: 0,
  1482. status: true,
  1483. fixed: '',
  1484. columnWidth: 80,
  1485. },
  1486. {
  1487. userId: this.$store.state.user.name,
  1488. functionId: 701002,
  1489. serialNumber: '701002Table2NotYetStartedResourceTotal',
  1490. tableId: "701002Table2",
  1491. tableName: "申请单工单信息明细表",
  1492. columnProp: 'notYetStartedResourceTotal',
  1493. headerAlign: "center",
  1494. align: "right",
  1495. columnLabel: '已排产未开工机台数',
  1496. columnHidden: false,
  1497. columnImage: false,
  1498. columnSortable: false,
  1499. sortLv: 0,
  1500. status: true,
  1501. fixed: '',
  1502. columnWidth: 120,
  1503. },
  1504. {
  1505. userId: this.$store.state.user.name,
  1506. functionId: 701002,
  1507. serialNumber: '701002Table2ApsResourceTotal',
  1508. tableId: "701002Table2",
  1509. tableName: "申请单工单信息明细表",
  1510. columnProp: 'apsResourceTotal',
  1511. headerAlign: "center",
  1512. align: "right",
  1513. columnLabel: '已排产机台总数',
  1514. columnHidden: false,
  1515. columnImage: false,
  1516. columnSortable: false,
  1517. sortLv: 0,
  1518. status: true,
  1519. fixed: '',
  1520. columnWidth: 120,
  1521. },
  1522. {
  1523. userId: this.$store.state.user.name,
  1524. functionId: 701002,
  1525. serialNumber: '701002Table2IssureQty',
  1526. tableId: "701002Table2",
  1527. tableName: "申请单工单信息明细表",
  1528. columnProp: "issureQty",
  1529. headerAlign: "center",
  1530. align: "right",
  1531. columnLabel: "发料数量",
  1532. columnHidden: false,
  1533. columnImage: false,
  1534. columnSortable: false,
  1535. sortLv: 0,
  1536. status: true,
  1537. fixed: '',
  1538. columnWidth: 80
  1539. },
  1540. ],
  1541. columnList3:[
  1542. {
  1543. userId: this.$store.state.user.name,
  1544. functionId: 701002,
  1545. serialNumber: '701002Table3OrderNo',
  1546. tableId: "701002Table3",
  1547. tableName: "申请单材料明细表",
  1548. columnProp: "orderNo",
  1549. headerAlign: "center",
  1550. align: "left",
  1551. columnLabel: "生产订单号",
  1552. columnHidden: false,
  1553. columnImage: false,
  1554. columnSortable: false,
  1555. sortLv: 0,
  1556. status: true,
  1557. fixed: '',
  1558. columnWidth: 130
  1559. },
  1560. {
  1561. userId: this.$store.state.user.name,
  1562. functionId: 701002,
  1563. serialNumber: '701002Table3BOMItemNo',
  1564. tableId: "701002Table3",
  1565. tableName: "申请单材料明细表",
  1566. columnProp: "bOMItemNo",
  1567. headerAlign: "center",
  1568. align: "right",
  1569. columnLabel: "BOM序号",
  1570. columnHidden: false,
  1571. columnImage: false,
  1572. columnSortable: false,
  1573. sortLv: 0,
  1574. status: true,
  1575. fixed: '',
  1576. columnWidth: 80
  1577. },{
  1578. userId: this.$store.state.user.name,
  1579. functionId: 701002,
  1580. serialNumber: '701002Table3ComponentPartNo',
  1581. tableId: "701002Table3",
  1582. tableName: "申请单材料明细表",
  1583. columnProp: "componentPartNo",
  1584. headerAlign: "center",
  1585. align: "center",
  1586. columnLabel: "材料编码",
  1587. columnHidden: false,
  1588. columnImage: false,
  1589. columnSortable: false,
  1590. sortLv: 0,
  1591. status: true,
  1592. fixed: '',
  1593. columnWidth: 130
  1594. },{
  1595. userId: this.$store.state.user.name,
  1596. functionId: 701002,
  1597. serialNumber: '701002Table3PartDesc',
  1598. tableId: "701002Table3",
  1599. tableName: "申请单材料明细表",
  1600. columnProp: "partDesc",
  1601. headerAlign: "center",
  1602. align: "left",
  1603. columnLabel: "材料名称",
  1604. columnHidden: false,
  1605. columnImage: false,
  1606. columnSortable: false,
  1607. sortLv: 0,
  1608. status: true,
  1609. fixed: '',
  1610. columnWidth: 300
  1611. },{
  1612. userId: this.$store.state.user.name,
  1613. functionId: 701002,
  1614. serialNumber: '701002Table3IssueMethod',
  1615. tableId: "701002Table3",
  1616. tableName: "申请单材料明细表",
  1617. columnProp: "issueMethod",
  1618. headerAlign: "center",
  1619. align: "left",
  1620. columnLabel: "领料方式",
  1621. columnHidden: false,
  1622. columnImage: false,
  1623. columnSortable: false,
  1624. sortLv: 0,
  1625. status: true,
  1626. fixed: '',
  1627. columnWidth: 100
  1628. },{
  1629. userId: this.$store.state.user.name,
  1630. functionId: 701002,
  1631. serialNumber: '701002Table3OutboundWarehouseId',
  1632. tableId: "701002Table3",
  1633. tableName: "申请单材料明细表",
  1634. columnProp: "warehouseName",
  1635. headerAlign: "center",
  1636. align: "left",
  1637. columnLabel: "领料仓库",
  1638. columnHidden: false,
  1639. columnImage: false,
  1640. columnSortable: false,
  1641. sortLv: 0,
  1642. status: true,
  1643. fixed: '',
  1644. columnWidth: 100
  1645. },
  1646. {
  1647. userId: this.$store.state.user.name,
  1648. functionId: 701002,
  1649. serialNumber: '701002Table3IssueType',
  1650. tableId: "701002Table3",
  1651. tableName: "申请单材料明细表",
  1652. columnProp: "issueType",
  1653. headerAlign: "center",
  1654. align: "left",
  1655. columnLabel: "类型",
  1656. columnHidden: false,
  1657. columnImage: false,
  1658. columnSortable: false,
  1659. sortLv: 0,
  1660. status: true,
  1661. fixed: '',
  1662. columnWidth: 80
  1663. },
  1664. ],
  1665. columnList3s:[
  1666. {
  1667. userId: this.$store.state.user.name,
  1668. functionId: 701002,
  1669. serialNumber: '701002Table3QtyToIssue',
  1670. tableId: "701002Table3",
  1671. tableName: "申请单材料明细表",
  1672. columnProp: "qtyToIssue",
  1673. headerAlign: "center",
  1674. align: "right",
  1675. columnLabel: "申请数量",
  1676. columnHidden: false,
  1677. columnImage: false,
  1678. columnSortable: false,
  1679. sortLv: 0,
  1680. status: true,
  1681. fixed: '',
  1682. columnWidth: 80
  1683. },
  1684. // {
  1685. // userId: this.$store.state.user.name,
  1686. // functionId: 701002,
  1687. // serialNumber: '701002Table3Remark',
  1688. // tableId: "701002Table3",
  1689. // tableName: "申请单材料明细表",
  1690. // columnProp: "remark",
  1691. // headerAlign: "center",
  1692. // align: "left",
  1693. // columnLabel: "备注",
  1694. // columnHidden: false,
  1695. // columnImage: false,
  1696. // columnSortable: false,
  1697. // sortLv: 0,
  1698. // status: true,
  1699. // fixed: '',
  1700. // columnWidth: 160
  1701. // },
  1702. {
  1703. userId: this.$store.state.user.name,
  1704. functionId: 701002,
  1705. serialNumber: '701002Table3OpsItemNo',
  1706. tableId: "701002Table3",
  1707. tableName: "申请单材料明细表",
  1708. columnProp: "opsItemNo",
  1709. headerAlign: "center",
  1710. align: "right",
  1711. columnLabel: "领料工序",
  1712. columnHidden: false,
  1713. columnImage: false,
  1714. columnSortable: false,
  1715. sortLv: 0,
  1716. status: true,
  1717. fixed: '',
  1718. columnWidth: 80
  1719. },{
  1720. userId: this.$store.state.user.name,
  1721. functionId: 701002,
  1722. serialNumber: '701002Table3LocationNo',
  1723. tableId: "701002Table3",
  1724. tableName: "申请单材料明细表",
  1725. columnProp: "locationNo",
  1726. headerAlign: "center",
  1727. align: "left",
  1728. columnLabel: "领料机台",
  1729. columnHidden: false,
  1730. columnImage: false,
  1731. columnSortable: false,
  1732. sortLv: 0,
  1733. status: true,
  1734. fixed: '',
  1735. columnWidth: 80
  1736. },{
  1737. userId: this.$store.state.user.name,
  1738. functionId: 701002,
  1739. serialNumber: '701002Table3SeqNo',
  1740. tableId: "701002Table3",
  1741. tableName: "申请单材料明细表",
  1742. columnProp: "seqNo",
  1743. headerAlign: "center",
  1744. align: "left",
  1745. columnLabel: "派工单号",
  1746. columnHidden: false,
  1747. columnImage: false,
  1748. columnSortable: false,
  1749. sortLv: 0,
  1750. status: true,
  1751. fixed: '',
  1752. columnWidth: 150
  1753. },
  1754. ],
  1755. columnList4:[
  1756. {
  1757. userId: this.$store.state.user.name,
  1758. functionId: 701002,
  1759. serialNumber: '701002Table4IssueType',
  1760. tableId: "701002Table4",
  1761. tableName: "申请单材料明细表",
  1762. columnProp: "issueType",
  1763. headerAlign: "center",
  1764. align: "left",
  1765. columnLabel: "类型",
  1766. columnHidden: false,
  1767. columnImage: false,
  1768. columnSortable: false,
  1769. sortLv: 0,
  1770. status: true,
  1771. fixed: '',
  1772. columnWidth: 80
  1773. },
  1774. {
  1775. userId: this.$store.state.user.name,
  1776. functionId: 701002,
  1777. serialNumber: '701002Table4ComponentPartNo',
  1778. tableId: "701002Table4",
  1779. tableName: "申请单材料明细表",
  1780. columnProp: "componentPartNo",
  1781. headerAlign: "center",
  1782. align: "left",
  1783. columnLabel: "材料编码",
  1784. columnHidden: false,
  1785. columnImage: false,
  1786. columnSortable: false,
  1787. sortLv: 0,
  1788. status: true,
  1789. fixed: '',
  1790. columnWidth: 100
  1791. },{
  1792. userId: this.$store.state.user.name,
  1793. functionId: 701002,
  1794. serialNumber: '701002Table4PartDesc',
  1795. tableId: "701002Table4",
  1796. tableName: "申请单材料明细表",
  1797. columnProp: "partDesc",
  1798. headerAlign: "center",
  1799. align: "left",
  1800. columnLabel: "材料名称",
  1801. columnHidden: false,
  1802. columnImage: false,
  1803. columnSortable: false,
  1804. sortLv: 0,
  1805. status: true,
  1806. fixed: '',
  1807. columnWidth: 200
  1808. },
  1809. {
  1810. userId: this.$store.state.user.name,
  1811. functionId: 701002,
  1812. serialNumber: '701002Table4PartDesc',
  1813. tableId: "701002Table4",
  1814. tableName: "申请单材料明细表",
  1815. columnProp: "warehouseName",
  1816. headerAlign: "center",
  1817. align: "left",
  1818. columnLabel: "领料仓库",
  1819. columnHidden: false,
  1820. columnImage: false,
  1821. columnSortable: false,
  1822. sortLv: 0,
  1823. status: true,
  1824. fixed: '',
  1825. columnWidth: 100
  1826. },
  1827. {
  1828. userId: this.$store.state.user.name,
  1829. functionId: 701002,
  1830. serialNumber: '701002Table4QtyToIssue',
  1831. tableId: "701002Table4",
  1832. tableName: "申请单材料明细表",
  1833. columnProp: "qtyToIssue",
  1834. headerAlign: "center",
  1835. align: "right",
  1836. columnLabel: "合计申请数量",
  1837. columnHidden: false,
  1838. columnImage: false,
  1839. columnSortable: false,
  1840. sortLv: 0,
  1841. status: true,
  1842. fixed: '',
  1843. columnWidth: 80
  1844. },{
  1845. userId: this.$store.state.user.name,
  1846. functionId: 701002,
  1847. serialNumber: '701002Table4QtyToIssueOriginal',
  1848. tableId: "701002Table4",
  1849. tableName: "申请单材料明细表",
  1850. columnProp: "qtyToIssueOriginal",
  1851. headerAlign: "center",
  1852. align: "right",
  1853. columnLabel: "合计已发数量",
  1854. columnHidden: false,
  1855. columnImage: false,
  1856. columnSortable: false,
  1857. sortLv: 0,
  1858. status: true,
  1859. fixed: '',
  1860. columnWidth: 80
  1861. },
  1862. ],
  1863. columnList5:[
  1864. {
  1865. userId: this.$store.state.user.name,
  1866. functionId: 701002,
  1867. serialNumber: '701002Table5UpdateType',
  1868. tableId: "701002Table5",
  1869. tableName: "申请单材料删除记录表",
  1870. columnProp: "updateType",
  1871. headerAlign: "center",
  1872. align: "center",
  1873. columnLabel: "删除类型",
  1874. columnHidden: false,
  1875. columnImage: false,
  1876. columnSortable: false,
  1877. sortLv: 0,
  1878. status: true,
  1879. fixed: '',
  1880. columnWidth: 100
  1881. },
  1882. {
  1883. userId: this.$store.state.user.name,
  1884. functionId: 701002,
  1885. serialNumber: '701002Table5ItemNo',
  1886. tableId: "701002Table5",
  1887. tableName: "申请单材料删除记录表",
  1888. columnProp: "itemNo",
  1889. headerAlign: "center",
  1890. align: "right",
  1891. columnLabel: "领料单序号",
  1892. columnHidden: false,
  1893. columnImage: false,
  1894. columnSortable: false,
  1895. sortLv: 0,
  1896. status: true,
  1897. fixed: '',
  1898. columnWidth: 80
  1899. },
  1900. {
  1901. userId: this.$store.state.user.name,
  1902. functionId: 701002,
  1903. serialNumber: '701002Table5SOOrderNo',
  1904. tableId: "701002Table5",
  1905. tableName: "申请单材料删除记录表",
  1906. columnProp: "sOOrderNo",
  1907. headerAlign: "center",
  1908. align: "left",
  1909. columnLabel: "生产订单",
  1910. columnHidden: false,
  1911. columnImage: false,
  1912. columnSortable: false,
  1913. sortLv: 0,
  1914. status: true,
  1915. fixed: '',
  1916. columnWidth: 80
  1917. },
  1918. {
  1919. userId: this.$store.state.user.name,
  1920. functionId: 701002,
  1921. serialNumber: '701002Table5SeqNo',
  1922. tableId: "701002Table5",
  1923. tableName: "申请单材料删除记录表",
  1924. columnProp: "seqNo",
  1925. headerAlign: "center",
  1926. align: "left",
  1927. columnLabel: "派工单",
  1928. columnHidden: false,
  1929. columnImage: false,
  1930. columnSortable: false,
  1931. sortLv: 0,
  1932. status: true,
  1933. fixed: '',
  1934. columnWidth: 120
  1935. },
  1936. {
  1937. userId: this.$store.state.user.name,
  1938. functionId: 701002,
  1939. serialNumber: '701002Table5ComponentPartNo',
  1940. tableId: "701002Table5",
  1941. tableName: "申请单材料删除记录表",
  1942. columnProp: "componentPartNo",
  1943. headerAlign: "center",
  1944. align: "left",
  1945. columnLabel: "材料物料编码",
  1946. columnHidden: false,
  1947. columnImage: false,
  1948. columnSortable: false,
  1949. sortLv: 0,
  1950. status: true,
  1951. fixed: '',
  1952. columnWidth: 100
  1953. },
  1954. {
  1955. userId: this.$store.state.user.name,
  1956. functionId: 701002,
  1957. serialNumber: '701002Table5IssueType',
  1958. tableId: "701002Table5",
  1959. tableName: "申请单材料删除记录表",
  1960. columnProp: "issueType",
  1961. headerAlign: "center",
  1962. align: "left",
  1963. columnLabel: "材料类型",
  1964. columnHidden: false,
  1965. columnImage: false,
  1966. columnSortable: false,
  1967. sortLv: 0,
  1968. status: true,
  1969. fixed: '',
  1970. columnWidth: 100
  1971. },
  1972. {
  1973. userId: this.$store.state.user.name,
  1974. functionId: 701002,
  1975. serialNumber: '701002Table5QtyToIssue',
  1976. tableId: "701002Table5",
  1977. tableName: "申请单材料删除记录表",
  1978. columnProp: "qtyToIssue",
  1979. headerAlign: "center",
  1980. align: "right",
  1981. columnLabel: "要求领料数量",
  1982. columnHidden: false,
  1983. columnImage: false,
  1984. columnSortable: false,
  1985. sortLv: 0,
  1986. status: true,
  1987. fixed: '',
  1988. columnWidth: 100
  1989. },
  1990. {
  1991. userId: this.$store.state.user.name,
  1992. functionId: 701002,
  1993. serialNumber: '701002Table5UpdateBy',
  1994. tableId: "701002Table5",
  1995. tableName: "申请单材料删除记录表",
  1996. columnProp: "updateBy",
  1997. headerAlign: "center",
  1998. align: "left",
  1999. columnLabel: "删除账号",
  2000. columnHidden: false,
  2001. columnImage: false,
  2002. columnSortable: false,
  2003. sortLv: 0,
  2004. status: true,
  2005. fixed: '',
  2006. columnWidth: 100
  2007. },
  2008. {
  2009. userId: this.$store.state.user.name,
  2010. functionId: 701002,
  2011. serialNumber: '701002Table5UpdateDate',
  2012. tableId: "701002Table5",
  2013. tableName: "申请单材料删除记录表",
  2014. columnProp: "updateDate",
  2015. headerAlign: "center",
  2016. align: "center",
  2017. columnLabel: "删除时间",
  2018. columnHidden: false,
  2019. columnImage: false,
  2020. columnSortable: false,
  2021. sortLv: 0,
  2022. status: true,
  2023. fixed: '',
  2024. columnWidth: 120
  2025. },
  2026. ],
  2027. columnList6:[
  2028. {
  2029. userId: this.$store.state.user.name,
  2030. functionId: 701002,
  2031. serialNumber: '701002Table6UserDisplay',
  2032. tableId: "701002Table6",
  2033. tableName: "申请单材料关闭明细",
  2034. columnProp: "userDisplay",
  2035. headerAlign: "center",
  2036. align: "left",
  2037. columnLabel: "操作人",
  2038. columnHidden: false,
  2039. columnImage: false,
  2040. columnSortable: false,
  2041. sortLv: 0,
  2042. status: true,
  2043. fixed: '',
  2044. columnWidth: 100
  2045. },
  2046. {
  2047. userId: this.$store.state.user.name,
  2048. functionId: 701002,
  2049. serialNumber: '701002Table6ActionTime',
  2050. tableId: "701002Table6",
  2051. tableName: "申请单材料关闭明细",
  2052. columnProp: "actionTime",
  2053. headerAlign: "center",
  2054. align: "left",
  2055. columnLabel: "操作时间",
  2056. columnHidden: false,
  2057. columnImage: false,
  2058. columnSortable: false,
  2059. sortLv: 0,
  2060. status: true,
  2061. fixed: '',
  2062. columnWidth: 130
  2063. },
  2064. {
  2065. userId: this.$store.state.user.name,
  2066. functionId: 701002,
  2067. serialNumber: '701002Table6ActionRemark',
  2068. tableId: "701002Table6",
  2069. tableName: "申请单材料关闭明细",
  2070. columnProp: "actionRemark",
  2071. headerAlign: "center",
  2072. align: "left",
  2073. columnLabel: "关闭原因",
  2074. columnHidden: false,
  2075. columnImage: false,
  2076. columnSortable: false,
  2077. sortLv: 0,
  2078. status: true,
  2079. fixed: '',
  2080. columnWidth: 300
  2081. },
  2082. ],
  2083. // 导出 start
  2084. exportData: [],
  2085. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  2086. exportHeader: ["发料申请单"],
  2087. exportFooter: [],
  2088. // 导出 end
  2089. orderDetailData:{
  2090. orderNo:'',
  2091. seqNo:'',
  2092. locationNo:'',
  2093. qtyrequired:'',
  2094. issureQty:0,
  2095. partDesc:'',
  2096. partNo:'',
  2097. resourceId:'',
  2098. resourceDesc:'',
  2099. needDate:'',
  2100. itemDesc:'',
  2101. workCenterNo:'',
  2102. itemNo:0,
  2103. materialType:'BOM物料',
  2104. alreadyApplyTotal: 0,
  2105. apsResourceTotal: 0,
  2106. notYetStartedResourceTotal: 0
  2107. },
  2108. chooseSOSModalFlag: false,
  2109. chooseSOSData: {
  2110. page: 1,
  2111. limit: 100,
  2112. orderno: '',
  2113. seqno: '',
  2114. sResourceid: '',
  2115. startDate: '',
  2116. endDate: '',
  2117. },
  2118. chooseOrderModalFlag: false,
  2119. chooseOrderData: {
  2120. page: 1,
  2121. limit: 100,
  2122. orderNo: '',
  2123. status: '',
  2124. date3: '',
  2125. date4: '',
  2126. statusList: '',
  2127. },
  2128. chooseOrderList: [],
  2129. chooseOperationModalFlag: false,
  2130. chooseOperationData: {
  2131. orderNo: '',
  2132. site: '',
  2133. itemDesc: ''
  2134. },
  2135. chooseOperationList: [],
  2136. chooseResourceModalFlag: false,
  2137. chooseResourceData: {
  2138. site: '',
  2139. workCenterNo: '',
  2140. resourceID: '',
  2141. resourceDesc: '',
  2142. },
  2143. chooseResourceList: [],
  2144. chooseSOSList: [],
  2145. choosePartModalFlag: false,
  2146. choosePartData: {
  2147. page: 1,
  2148. limit: 100,
  2149. site: '',
  2150. sourceBu: '',
  2151. partNo: '',
  2152. partDesc: '',
  2153. spec: '',
  2154. },
  2155. choosePartList: [],
  2156. chooseSOSColumnList: [
  2157. {
  2158. userId: this.$store.state.user.name,
  2159. functionId: 701001,
  2160. serialNumber: '701001Table2Orderno',
  2161. tableId: "701001Table2",
  2162. tableName: "查询派工单",
  2163. columnProp: 'orderno',
  2164. headerAlign: "center",
  2165. align: "center",
  2166. columnLabel: '生产订单',
  2167. columnHidden: false,
  2168. columnImage: false,
  2169. columnSortable: false,
  2170. sortLv: 0,
  2171. status: true,
  2172. fixed: '',
  2173. columnWidth: 120,
  2174. },
  2175. {
  2176. userId: this.$store.state.user.name,
  2177. functionId: 701001,
  2178. serialNumber: '701001Table2Seqno',
  2179. tableId: "701001Table2",
  2180. tableName: "查询派工单",
  2181. columnProp: 'seqno',
  2182. headerAlign: "center",
  2183. align: "center",
  2184. columnLabel: '派工单号',
  2185. columnHidden: false,
  2186. columnImage: false,
  2187. columnSortable: false,
  2188. sortLv: 0,
  2189. status: true,
  2190. fixed: '',
  2191. columnWidth: 150,
  2192. },
  2193. {
  2194. userId: this.$store.state.user.name,
  2195. functionId: 701001,
  2196. serialNumber: '701001Table2PartNo',
  2197. tableId: "701001Table2",
  2198. tableName: "查询派工单",
  2199. columnProp: 'partNo',
  2200. headerAlign: "center",
  2201. align: "left",
  2202. columnLabel: '物料编码',
  2203. columnHidden: false,
  2204. columnImage: false,
  2205. columnSortable: false,
  2206. sortLv: 0,
  2207. status: true,
  2208. fixed: '',
  2209. columnWidth: 80,
  2210. },
  2211. {
  2212. userId: this.$store.state.user.name,
  2213. functionId: 701001,
  2214. serialNumber: '701001Table2PartDesc',
  2215. tableId: "701001Table2",
  2216. tableName: "查询派工单",
  2217. columnProp: 'partDesc',
  2218. headerAlign: "center",
  2219. align: "left",
  2220. columnLabel: '物料描述',
  2221. columnHidden: false,
  2222. columnImage: false,
  2223. columnSortable: false,
  2224. sortLv: 0,
  2225. status: true,
  2226. fixed: '',
  2227. columnWidth: 120,
  2228. },
  2229. {
  2230. userId: this.$store.state.user.name,
  2231. functionId: 701001,
  2232. serialNumber: '701001Table2Qtyrequired',
  2233. tableId: "701001Table2",
  2234. tableName: "查询派工单",
  2235. columnProp: 'qtyrequired',
  2236. headerAlign: "center",
  2237. align: "right",
  2238. columnLabel: '派工数量',
  2239. columnHidden: false,
  2240. columnImage: false,
  2241. columnSortable: false,
  2242. sortLv: 0,
  2243. status: true,
  2244. fixed: '',
  2245. columnWidth: 80,
  2246. },
  2247. {
  2248. userId: this.$store.state.user.name,
  2249. functionId: 701001,
  2250. serialNumber: '701001Table2SResourceid',
  2251. tableId: "701001Table2",
  2252. tableName: "查询派工单",
  2253. columnProp: 'sResourceid',
  2254. headerAlign: "center",
  2255. align: "left",
  2256. columnLabel: '机台编码',
  2257. columnHidden: false,
  2258. columnImage: false,
  2259. columnSortable: false,
  2260. sortLv: 0,
  2261. status: true,
  2262. fixed: '',
  2263. columnWidth: 60,
  2264. },
  2265. {
  2266. userId: this.$store.state.user.name,
  2267. functionId: 701001,
  2268. serialNumber: '701001Table2ResourceDesc',
  2269. tableId: "701001Table2",
  2270. tableName: "查询派工单",
  2271. columnProp: 'resourceDesc',
  2272. headerAlign: "center",
  2273. align: "left",
  2274. columnLabel: '机台名称',
  2275. columnHidden: false,
  2276. columnImage: false,
  2277. columnSortable: false,
  2278. sortLv: 0,
  2279. status: true,
  2280. fixed: '',
  2281. columnWidth: 100,
  2282. },
  2283. {
  2284. userId: this.$store.state.user.name,
  2285. functionId: 701001,
  2286. serialNumber: '701001Table2StartDate',
  2287. tableId: "701001Table2",
  2288. tableName: "查询派工单",
  2289. columnProp: 'startDate',
  2290. headerAlign: "center",
  2291. align: "left",
  2292. columnLabel: '开始日期',
  2293. columnHidden: false,
  2294. columnImage: false,
  2295. columnSortable: false,
  2296. sortLv: 0,
  2297. status: true,
  2298. fixed: '',
  2299. columnWidth: 100,
  2300. },
  2301. ],
  2302. chooseOrderColumnList: [
  2303. {
  2304. userId: this.$store.state.user.name,
  2305. functionId: 701001,
  2306. serialNumber: '701001Table2Orderno',
  2307. tableId: "701001Table2",
  2308. tableName: "查询工单",
  2309. columnProp: 'orderNo',
  2310. headerAlign: "center",
  2311. align: "center",
  2312. columnLabel: '工单号',
  2313. columnHidden: false,
  2314. columnImage: false,
  2315. columnSortable: false,
  2316. sortLv: 0,
  2317. status: true,
  2318. fixed: '',
  2319. columnWidth: 120,
  2320. },
  2321. {
  2322. userId: this.$store.state.user.name,
  2323. functionId: 701001,
  2324. serialNumber: '701001Table2PartNo',
  2325. tableId: "701001Table2",
  2326. tableName: "查询工单",
  2327. columnProp: 'partNo',
  2328. headerAlign: "center",
  2329. align: "left",
  2330. columnLabel: '物料编码',
  2331. columnHidden: false,
  2332. columnImage: false,
  2333. columnSortable: false,
  2334. sortLv: 0,
  2335. status: true,
  2336. fixed: '',
  2337. columnWidth: 120,
  2338. },
  2339. {
  2340. userId: this.$store.state.user.name,
  2341. functionId: 701001,
  2342. serialNumber: '701001Table2PartDescription',
  2343. tableId: "701001Table2",
  2344. tableName: "查询工单",
  2345. columnProp: 'partDescription',
  2346. headerAlign: "center",
  2347. align: "left",
  2348. columnLabel: '物料描述',
  2349. columnHidden: false,
  2350. columnImage: false,
  2351. columnSortable: false,
  2352. sortLv: 0,
  2353. status: true,
  2354. fixed: '',
  2355. columnWidth: 150,
  2356. },
  2357. {
  2358. userId: this.$store.state.user.name,
  2359. functionId: 701001,
  2360. serialNumber: '701001Table2LotSize',
  2361. tableId: "701001Table2",
  2362. tableName: "查询工单",
  2363. columnProp: 'lotSize',
  2364. headerAlign: "center",
  2365. align: "right",
  2366. columnLabel: '工单数量',
  2367. columnHidden: false,
  2368. columnImage: false,
  2369. columnSortable: false,
  2370. sortLv: 0,
  2371. status: true,
  2372. fixed: '',
  2373. columnWidth: 100,
  2374. },
  2375. {
  2376. userId: this.$store.state.user.name,
  2377. functionId: 701001,
  2378. serialNumber: '701001Table2Status',
  2379. tableId: "701001Table2",
  2380. tableName: "查询工单",
  2381. columnProp: 'status',
  2382. headerAlign: "center",
  2383. align: "center",
  2384. columnLabel: '状态',
  2385. columnHidden: false,
  2386. columnImage: false,
  2387. columnSortable: false,
  2388. sortLv: 0,
  2389. status: true,
  2390. fixed: '',
  2391. columnWidth: 80,
  2392. },
  2393. ],
  2394. chooseOperationColumnList: [
  2395. {
  2396. userId: this.$store.state.user.name,
  2397. functionId: 701001,
  2398. serialNumber: '701001Table2ItemNo',
  2399. tableId: "701001Table2",
  2400. tableName: "查询工序",
  2401. columnProp: 'itemNo',
  2402. headerAlign: "center",
  2403. align: "center",
  2404. columnLabel: '工序号',
  2405. columnHidden: false,
  2406. columnImage: false,
  2407. columnSortable: false,
  2408. sortLv: 0,
  2409. status: true,
  2410. fixed: '',
  2411. columnWidth: 80,
  2412. },
  2413. {
  2414. userId: this.$store.state.user.name,
  2415. functionId: 701001,
  2416. serialNumber: '701001Table2OperationDesc',
  2417. tableId: "701001Table2",
  2418. tableName: "查询工序",
  2419. columnProp: 'operationDesc',
  2420. headerAlign: "center",
  2421. align: "left",
  2422. columnLabel: '工序名称',
  2423. columnHidden: false,
  2424. columnImage: false,
  2425. columnSortable: false,
  2426. sortLv: 0,
  2427. status: true,
  2428. fixed: '',
  2429. columnWidth: 120,
  2430. }
  2431. ],
  2432. chooseResourceColumnList: [
  2433. {
  2434. userId: this.$store.state.user.name,
  2435. functionId: 701001,
  2436. serialNumber: '701001Table2ResourceID',
  2437. tableId: "701001Table2",
  2438. tableName: "查询机台",
  2439. columnProp: 'resourceID',
  2440. headerAlign: "center",
  2441. align: "left",
  2442. columnLabel: '机台编码',
  2443. columnHidden: false,
  2444. columnImage: false,
  2445. columnSortable: false,
  2446. sortLv: 0,
  2447. status: true,
  2448. fixed: '',
  2449. columnWidth: 100,
  2450. },
  2451. {
  2452. userId: this.$store.state.user.name,
  2453. functionId: 701001,
  2454. serialNumber: '701001Table2ResourceDesc',
  2455. tableId: "701001Table2",
  2456. tableName: "查询机台",
  2457. columnProp: 'resourceDesc',
  2458. headerAlign: "center",
  2459. align: "left",
  2460. columnLabel: '机台描述',
  2461. columnHidden: false,
  2462. columnImage: false,
  2463. columnSortable: false,
  2464. sortLv: 0,
  2465. status: true,
  2466. fixed: '',
  2467. columnWidth: 150,
  2468. },
  2469. ],
  2470. detailModal2: false,
  2471. detailList2: [],
  2472. columnDetailList2: [
  2473. {
  2474. columnProp: 'subNo',
  2475. headerAlign: "center",
  2476. align: "left",
  2477. columnLabel: '标签条码',
  2478. columnHidden: false,
  2479. columnImage: false,
  2480. columnSortable: false,
  2481. sortLv: 0,
  2482. status: true,
  2483. fixed: '',
  2484. columnWidth: 100,
  2485. },
  2486. {
  2487. columnProp: 'subQty',
  2488. headerAlign: "center",
  2489. align: "right",
  2490. columnLabel: '出库数量',
  2491. columnHidden: false,
  2492. columnImage: false,
  2493. columnSortable: false,
  2494. sortLv: 0,
  2495. status: true,
  2496. fixed: '',
  2497. columnWidth: 100,
  2498. },
  2499. {
  2500. columnProp: 'orderRef4',
  2501. headerAlign: "center",
  2502. align: "left",
  2503. columnLabel: '出库仓库',
  2504. columnHidden: false,
  2505. columnImage: false,
  2506. columnSortable: false,
  2507. sortLv: 0,
  2508. status: true,
  2509. fixed: '',
  2510. columnWidth: 150,
  2511. },
  2512. {
  2513. columnProp: 'orderRef5',
  2514. headerAlign: "center",
  2515. align: "left",
  2516. columnLabel: '出库库位',
  2517. columnHidden: false,
  2518. columnImage: false,
  2519. columnSortable: false,
  2520. sortLv: 0,
  2521. status: true,
  2522. fixed: '',
  2523. columnWidth: 150,
  2524. },
  2525. {
  2526. columnProp: 'userName',
  2527. headerAlign: "center",
  2528. align: "left",
  2529. columnLabel: '操作员',
  2530. columnHidden: false,
  2531. columnImage: false,
  2532. columnSortable: false,
  2533. sortLv: 0,
  2534. status: true,
  2535. fixed: '',
  2536. columnWidth: 100,
  2537. },
  2538. {
  2539. columnProp: 'transDate',
  2540. headerAlign: "center",
  2541. align: "center",
  2542. columnLabel: '操作时间',
  2543. columnHidden: false,
  2544. columnImage: false,
  2545. columnSortable: false,
  2546. sortLv: 0,
  2547. status: true,
  2548. fixed: '',
  2549. columnWidth: 170,
  2550. },
  2551. ],
  2552. editBatchVisible: false,
  2553. saveLoading: false,
  2554. }
  2555. },
  2556. computed: {
  2557. // 计算属性:判断当前状态是否可编辑
  2558. isEditableStatusComputed() {
  2559. if (!this.currentRow || !this.currentRow.status) {
  2560. return false;
  2561. }
  2562. return this.currentRow.status === '草稿' || this.currentRow.status === '编辑中' || this.currentRow.status === '待确认';
  2563. }
  2564. },
  2565. mounted () {
  2566. this.$nextTick(() => {
  2567. this.height = (window.innerHeight- 315) / 2
  2568. })
  2569. },
  2570. created () {
  2571. this.getSiteAndBuByUserName()
  2572. this.searchTable()
  2573. },
  2574. methods: {
  2575. // 批量编辑模态框
  2576. editBatchModel() {
  2577. if (this.currentRow.status !== '草稿' && this.currentRow.status !== '编辑中' && this.currentRow.status !== '待确认') {
  2578. this.$message.warning('该类型单据不能编辑!')
  2579. return
  2580. }
  2581. if (this.editBatchVisible) {
  2582. this.editBatchVisible = false
  2583. } else {
  2584. this.editBatchVisible = true
  2585. }
  2586. },
  2587. // 批量保存
  2588. batchModel() {
  2589. let params = []
  2590. params = this.dataList3
  2591. this.saveLoading = true
  2592. updateNotifyDetail(params).then(({data}) => {
  2593. if (data && data.code === 0) {
  2594. this.getNotifyMaterialList()
  2595. this.$message.success(data.msg)
  2596. this.editBatchVisible = false
  2597. } else {
  2598. this.$message.error(data.msg)
  2599. }
  2600. }).finally(() => {
  2601. this.saveLoading = false
  2602. })
  2603. },
  2604. // 出库明细
  2605. outboundDetailModal (row) {
  2606. let tempData = {
  2607. site: row.site,
  2608. buNo: row.bu,
  2609. orderNo: row.notifyNo,
  2610. partNo: row.componentPartNo,
  2611. orderType: '生产领料'
  2612. }
  2613. getOutboundDetail2(tempData).then(({data}) => {
  2614. if (data && data.code === 0) {
  2615. this.detailList2 = data.rows
  2616. } else {
  2617. this.detailList2 = []
  2618. }
  2619. })
  2620. this.detailModal2 = true
  2621. },
  2622. // 动态列开始 获取 用户保存的 格式列
  2623. async getTableUserColumn(tableId, columnId) {
  2624. let queryTableUser = {
  2625. userId: this.$store.state.user.name,
  2626. functionId: this.$route.meta.menuId,
  2627. tableId: tableId,
  2628. status: true,
  2629. languageCode: this.$i18n.locale
  2630. }
  2631. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  2632. if (data.rows.length > 0) {
  2633. //this.columnList1 = []
  2634. switch (columnId) {
  2635. case 1:
  2636. this.columnList1 = data.rows
  2637. break;
  2638. case 2:
  2639. this.columnList2 = data.rows
  2640. break;
  2641. case 3:
  2642. this.columnList3 = data.rows
  2643. break;
  2644. case 4:
  2645. this.columnList4 = data.rows
  2646. break;
  2647. case 5:
  2648. this.columnList5 = data.rows
  2649. break;
  2650. case 6:
  2651. this.columnList6 = data.rows
  2652. break;
  2653. }
  2654. } else {
  2655. this.getColumnList(tableId, columnId)
  2656. }
  2657. })
  2658. },
  2659. // 获取 tableDefault 列
  2660. async getColumnList (tableId, columnId) {
  2661. let queryTable= {
  2662. functionId: this.$route.meta.menuId,
  2663. tableId: tableId,
  2664. languageCode: this.$i18n.locale
  2665. }
  2666. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  2667. if (!data.rows.length == 0) {
  2668. switch (columnId) {
  2669. case 1:
  2670. this.columnList1 = data.rows
  2671. break;
  2672. case 2:
  2673. this.columnList2 = data.rows
  2674. break;
  2675. case 3:
  2676. this.columnList3 = data.rows
  2677. break;
  2678. case 4:
  2679. this.columnList4 = data.rows
  2680. break;
  2681. case 5:
  2682. this.columnList5 = data.rows
  2683. break;
  2684. case 6:
  2685. this.columnList6 = data.rows
  2686. break;
  2687. }
  2688. } else {
  2689. // this.showDefault = true.
  2690. }
  2691. })
  2692. },
  2693. // 每页数
  2694. sizeChangeHandle (val) {
  2695. this.pageSize = val
  2696. this.pageIndex = 1
  2697. this.searchTable()
  2698. },
  2699. // 当前页
  2700. currentChangeHandle (val) {
  2701. this.pageIndex = val
  2702. this.searchTable()
  2703. },
  2704. tabClick (tab, event) {
  2705. // 刷新列表数据
  2706. this.refreshCurrentTabTable()
  2707. },
  2708. changeData(row){
  2709. this.currentRow = JSON.parse(JSON.stringify(row));
  2710. this.refreshCurrentTabTable ();
  2711. },
  2712. refreshCurrentTabTable(){
  2713. if(this.currentRow===''||this.currentRow===null){
  2714. this.currentRow={site:'',notifyNo:''}
  2715. }
  2716. if(this.activeName==='detail'){
  2717. searchNotifyOrderList(this.currentRow).then(({data}) => {
  2718. //区分请求成功和失败的状况
  2719. if (data && data.code == 0) {
  2720. this.dataList2 = data.rows
  2721. } else {
  2722. this.dataList2 = [];
  2723. }
  2724. });
  2725. }else if(this.activeName==='sub'){
  2726. searchNotifyMaterialList(this.currentRow).then(({data}) => {
  2727. //区分请求成功和失败的状况
  2728. if (data && data.code == 0) {
  2729. this.dataList3 = data.rows
  2730. } else {
  2731. this.dataList3 = [];
  2732. }
  2733. });
  2734. }
  2735. // else if(this.activeName==='change'){
  2736. // searchNotifyLog(this.currentRow).then(({data}) => {
  2737. // //区分请求成功和失败的状况
  2738. // if (data && data.code == 0) {
  2739. // this.dataList5 = data.rows
  2740. //
  2741. // } else {
  2742. // this.dataList5 = [];
  2743. // }
  2744. // });
  2745. // }
  2746. // else if(this.activeName==='close'){
  2747. // searchNotifyLogClose(this.currentRow).then(({data}) => {
  2748. // //区分请求成功和失败的状况
  2749. // if (data && data.code == 0) {
  2750. // this.dataList6 = data.rows
  2751. //
  2752. // } else {
  2753. // this.dataList6 = [];
  2754. // }
  2755. // });
  2756. // }
  2757. else {
  2758. searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
  2759. //区分请求成功和失败的状况
  2760. if (data && data.code == 0) {
  2761. this.dataList4 = data.rows
  2762. } else {
  2763. this.dataList4 = [];
  2764. }
  2765. this.$nextTick(() => {
  2766. this.$refs.sum.doLayout(); // 重新计算布局
  2767. });
  2768. });
  2769. }
  2770. },
  2771. getNotifyMaterialList () {
  2772. searchNotifyMaterialList(this.currentRow).then(({data}) => {
  2773. //区分请求成功和失败的状况
  2774. if (data && data.code == 0) {
  2775. this.dataList3 = data.rows
  2776. } else {
  2777. this.dataList3 = []
  2778. }
  2779. })
  2780. },
  2781. searchTable(){
  2782. this.searchData.limit = this.pageSize
  2783. this.searchData.page = this.pageIndex
  2784. // 返回 Promise,让外部可以等它完成
  2785. return new Promise((resolve, reject) => {
  2786. searchNotifyHeader(this.searchData).then(({ data }) => {
  2787. if (data && data.code == 0) {
  2788. this.dataList = data.page.list;
  2789. this.pageIndex = data.page.currPage;
  2790. this.pageSize = data.page.pageSize;
  2791. this.totalPage = data.page.totalCount;
  2792. resolve(); // 请求成功,执行 resolve
  2793. } else {
  2794. this.dataList = [];
  2795. reject(new Error(data ? data.msg : '请求失败'));
  2796. }
  2797. }).catch(err => {
  2798. this.dataList = [];
  2799. reject(err); // 请求出错
  2800. });
  2801. });
  2802. },
  2803. closeNotifyModel(row){
  2804. this.closeData.site=row.site
  2805. this.closeData.notifyNo=row.notifyNo
  2806. this.closeData.closeRemark=''
  2807. this.closeModalFlag=true
  2808. },
  2809. closeNotify(){
  2810. if(this.closeData.closeRemark==null||this.closeData.closeRemark===''){
  2811. this.$alert("必须输入关闭原因", '错误', {
  2812. confirmButtonText: '确定'
  2813. })
  2814. return false;
  2815. }
  2816. let inData={
  2817. site:this.closeData.site,
  2818. notifyNo:this.closeData.notifyNo,
  2819. closeRemark:this.closeData.closeRemark,
  2820. username:this.$store.state.user.name,
  2821. status:'已关闭',
  2822. }
  2823. updateNotifyStatus(inData).then(({data}) => {
  2824. if (data && data.code === 0) {
  2825. this.closeModalFlag=false
  2826. this.searchTable()
  2827. this.$message({
  2828. message: '操作成功',
  2829. type: 'success',
  2830. duration: 1500,
  2831. onClose: () => {}
  2832. })
  2833. } else {
  2834. this.$alert(data.msg, '错误', {
  2835. confirmButtonText: '确定'
  2836. })
  2837. }
  2838. })
  2839. },
  2840. deleteNotifyConfirm(row){
  2841. this.$confirm('确认删除?', '提示', {
  2842. confirmButtonText: '确定',
  2843. cancelButtonText: '取消',
  2844. type: 'warning'
  2845. }).then(() => {
  2846. let inData={
  2847. site:row.site,
  2848. notifyNo:row.notifyNo
  2849. }
  2850. deleteNotify(inData).then(({data}) => {
  2851. if (data && data.code === 0) {
  2852. this.searchTable()
  2853. this.$message({
  2854. message: '操作成功',
  2855. type: 'success',
  2856. duration: 1500,
  2857. onClose: () => {}
  2858. })
  2859. } else {
  2860. this.$alert(data.msg, '错误', {
  2861. confirmButtonText: '确定'
  2862. })
  2863. }
  2864. })
  2865. })
  2866. },
  2867. openNotify(row){
  2868. this.$confirm('确认打开?', '提示', {
  2869. confirmButtonText: '确定',
  2870. cancelButtonText: '取消',
  2871. type: 'warning'
  2872. }).then(() => {
  2873. let inData={
  2874. site:row.site,
  2875. notifyNo:row.notifyNo,
  2876. status:'已下达',
  2877. }
  2878. updateNotifyStatus(inData).then(({data}) => {
  2879. if (data && data.code === 0) {
  2880. this.searchTable()
  2881. this.$message({
  2882. message: '操作成功',
  2883. type: 'success',
  2884. duration: 1500,
  2885. onClose: () => {}
  2886. })
  2887. } else {
  2888. this.$alert(data.msg, '错误', {
  2889. confirmButtonText: '确定'
  2890. })
  2891. }
  2892. })
  2893. })
  2894. },
  2895. deleteNotifyMaterial(row){
  2896. this.$confirm('确认删除?', '提示', {
  2897. confirmButtonText: '确定',
  2898. cancelButtonText: '取消',
  2899. type: 'warning'
  2900. }).then(() => {
  2901. deleteNotifyMaterial(row).then(({data}) => {
  2902. if (data && data.code === 0) {
  2903. this.refreshCurrentTabTable()
  2904. this.$message({
  2905. message: '操作成功',
  2906. type: 'success',
  2907. duration: 1500,
  2908. onClose: () => {}
  2909. })
  2910. } else {
  2911. this.$alert(data.msg, '错误', {
  2912. confirmButtonText: '确定'
  2913. })
  2914. }
  2915. })
  2916. })
  2917. },
  2918. deleteNotifySOSPlus(row){
  2919. // 检查当前状态是否允许编辑
  2920. if (!this.isEditableStatusComputed) {
  2921. this.$alert('当前状态不允许编辑!只有草稿、编辑中或待确认状态才能删除明细。', '提示', {
  2922. confirmButtonText: '确定'
  2923. })
  2924. return false
  2925. }
  2926. this.$confirm('确认删除?', '提示', {
  2927. confirmButtonText: '确定',
  2928. cancelButtonText: '取消',
  2929. type: 'warning'
  2930. }).then(() => {
  2931. deleteNotifySOSPlus(row).then(({data}) => {
  2932. if (data && data.code === 0) {
  2933. this.refreshCurrentTabTable()
  2934. this.$message({
  2935. message: '操作成功',
  2936. type: 'success',
  2937. duration: 1500,
  2938. onClose: () => {}
  2939. })
  2940. } else {
  2941. this.$alert(data.msg, '错误', {
  2942. confirmButtonText: '确定'
  2943. })
  2944. }
  2945. })
  2946. })
  2947. },
  2948. //申请单主表新增方法
  2949. //新增领料申请单模态框
  2950. createNotifyModal(){
  2951. this.notifyData = {
  2952. site: '',
  2953. bu: this.userBuList[0].buNo,
  2954. notifyNo: '',
  2955. notifyDate: '',
  2956. enteredDate: '',
  2957. userName: this.$store.state.user.name,
  2958. userDisplay: '',
  2959. remark: '',
  2960. planIssueDate: '',
  2961. workCenterNo: ''
  2962. }
  2963. this.createNotifyFlag = true
  2964. },
  2965. getSiteAndBuByUserName() {
  2966. let inData = {
  2967. username: this.$store.state.user.name
  2968. }
  2969. getSiteAndBuByUserName(inData).then(({data}) =>{
  2970. if (data && data.code === 0) {
  2971. this.userBuList = data.rows
  2972. if (this.userBuList.length > 0) {
  2973. this.getWorkCenterList()
  2974. }
  2975. }
  2976. })
  2977. },
  2978. // 查加工中心
  2979. getWorkCenterList() {
  2980. let inData = {
  2981. site: this.userBuList[0].buNo.split('_')[0],
  2982. buNo: this.userBuList[0].buNo.split('_')[1]
  2983. }
  2984. getWorkCenterList(inData).then(({data}) =>{
  2985. if (data && data.code === 0) {
  2986. this.workCenterList = data.rows
  2987. }
  2988. })
  2989. },
  2990. //保存领料申请单
  2991. saveNotify() {
  2992. let buValue = this.notifyData.bu
  2993. let site = buValue.split('_')[0]
  2994. let bu = buValue.split('_')[1]
  2995. let inData = {
  2996. site: site,
  2997. bu: bu,
  2998. userName: this.$store.state.user.name,
  2999. remark: this.notifyData.remark,
  3000. workCenterNo: this.notifyData.workCenterNo,
  3001. }
  3002. createNotify(inData).then(({data})=>{
  3003. if (data.code === 0) {
  3004. this.$message({
  3005. message: '操作成功',
  3006. type: 'success',
  3007. duration: 1500,
  3008. onClose: () => {}
  3009. })
  3010. this.createNotifyFlag = false
  3011. // 刷新主表数据
  3012. this.searchTable()
  3013. }else {
  3014. this.$alert(data.msg, '错误', {
  3015. confirmButtonText: '确定'
  3016. })
  3017. }
  3018. })
  3019. },
  3020. //新增派工单明细
  3021. createOrderDetail(){
  3022. // 检查是否选择了主表行
  3023. if (!this.currentRow || !this.currentRow.notifyNo) {
  3024. this.$alert('请先选择一条主表记录!', '提示', {
  3025. confirmButtonText: '确定'
  3026. })
  3027. return false
  3028. }
  3029. // 检查当前状态是否允许编辑
  3030. if (!this.isEditableStatusComputed) {
  3031. this.$alert('当前状态不允许编辑!只有草稿、编辑中或待确认状态才能新增明细。', '提示', {
  3032. confirmButtonText: '确定'
  3033. })
  3034. return false
  3035. }
  3036. // 清除所有数据,设置默认值
  3037. this.orderDetailData = {
  3038. orderNo: '',
  3039. seqNo: '',
  3040. operationNo: '',
  3041. locationNo: '',
  3042. qtyRequired: '',
  3043. issureQty: 0,
  3044. partDesc: '',
  3045. partNo: '',
  3046. resourceId: '',
  3047. resourceDesc: '',
  3048. itemDesc: '',
  3049. itemNo: 0,
  3050. workCenterNo: '',
  3051. needDate: '',
  3052. materialType: 'BOM物料',
  3053. alreadyApplyTotal: 0,
  3054. apsResourceTotal: 0,
  3055. notYetStartedResourceTotal: 0
  3056. }
  3057. this.saveOrderDetailFlag = true
  3058. },
  3059. saveIssueNoOrderDetail(){
  3060. // 数据验证
  3061. // 非BOM物料时,只校验领取数量和要求发料时间
  3062. if (this.orderDetailData.materialType === 'BOM物料') {
  3063. if (!this.orderDetailData.orderNo ) {
  3064. this.$message.error('请选择工单或者派工单');
  3065. return false
  3066. }
  3067. if (!this.orderDetailData.itemNo) {
  3068. this.$message.error('请选择工序');
  3069. return false
  3070. }
  3071. /*//校验如果是BOM物料的话领料数量不能大于工单数量
  3072. if (this.orderDetailData.issureQty > this.orderDetailData.qtyRequired){
  3073. this.$message.error('领取数量不可大于工单/派工数量!');
  3074. return false
  3075. }
  3076. //校验如果是BOM物料的话,领料数量不能大于工单数量
  3077. if ((this.orderDetailData.issureQty + this.orderDetailData.alreadyApplyTotal) > this.orderDetailData.qtyRequired){
  3078. this.$message.error('申请总和不可超出工单/派工数量!');
  3079. return false
  3080. }*/
  3081. }
  3082. if (!this.orderDetailData.needDate) {
  3083. this.$message.error('请选择要求发料时间');
  3084. return false
  3085. }
  3086. if (!this.orderDetailData.issureQty || this.orderDetailData.issureQty <= 0) {
  3087. this.$message.error('请填写领取数量');
  3088. return false
  3089. }
  3090. // 构建API请求参数
  3091. let inData = {
  3092. site: this.currentRow.site,
  3093. bu: this.currentRow.bu,
  3094. notifyNo: this.currentRow.notifyNo,
  3095. materialType: this.orderDetailData.materialType,
  3096. sOOrderNo: this.orderDetailData.orderNo,
  3097. seqNo: this.orderDetailData.seqNo,
  3098. fGPartNo: this.orderDetailData.partNo,
  3099. opsItemNo: this.orderDetailData.itemNo,
  3100. issureQty: this.orderDetailData.issureQty,
  3101. needDate: this.orderDetailData.needDate,
  3102. outWorkOrderFlag: 'N',
  3103. username: this.$store.state.user.name,
  3104. // 扩展字段
  3105. itemDesc: this.orderDetailData.itemDesc,
  3106. partDesc: this.orderDetailData.partDesc,
  3107. resourceDesc: this.orderDetailData.resourceDesc,
  3108. resourceId: this.orderDetailData.resourceId,
  3109. workCenterNo: this.orderDetailData.workCenterNo,
  3110. qtyrequired: this.orderDetailData.qtyRequired,
  3111. apsResourceTotal: this.orderDetailData.apsResourceTotal,
  3112. notYetStartedResourceTotal: this.orderDetailData.notYetStartedResourceTotal
  3113. }
  3114. // 调用API保存派工单数据
  3115. saveIssueNoOrderDetail(inData).then(({data}) => {
  3116. if (data && data.code === 0) {
  3117. this.$message({
  3118. message: '保存成功',
  3119. type: 'success',
  3120. duration: 1500,
  3121. onClose: () => {}
  3122. })
  3123. // 关闭模态框
  3124. this.saveOrderDetailFlag = false
  3125. // 刷新当前标签页数据
  3126. this.refreshCurrentTabTable()
  3127. // 清空表单数据
  3128. this.orderDetailData = {
  3129. orderNo: '',
  3130. seqNo: '',
  3131. operationNo: '',
  3132. locationNo: '',
  3133. qtyRequired: '',
  3134. issureQty: 0,
  3135. partDesc: '',
  3136. partNo: '',
  3137. resourceId: '',
  3138. resourceDesc: '',
  3139. itemDesc: '',
  3140. itemNo: 0,
  3141. workCenterNo: '',
  3142. needDate: '',
  3143. materialType: 'BOM物料',
  3144. alreadyApplyTotal: 0,
  3145. apsResourceTotal: 0,
  3146. notYetStartedResourceTotal: 0
  3147. }
  3148. } else {
  3149. this.$alert(data.msg || '保存失败', '错误', {
  3150. confirmButtonText: '确定'
  3151. })
  3152. }
  3153. }).catch(error => {
  3154. console.error('保存派工单明细失败:', error)
  3155. this.$alert('保存失败,请稍后重试', '错误', {
  3156. confirmButtonText: '确定'
  3157. })
  3158. })
  3159. },
  3160. //导出excel
  3161. async createExportData() {
  3162. this.searchData.limit = -1
  3163. this.searchData.page = 1
  3164. const {data} = await searchNotifyHeader(this.searchData)
  3165. return data.page.list;
  3166. },
  3167. startDownload() {
  3168. // this.exportData = this.dataList
  3169. },
  3170. finishDownload() {
  3171. },
  3172. fields() {
  3173. let json = "{"
  3174. this.columnList1.forEach((item, index) => {
  3175. if (index == this.columnList1.length - 1) {
  3176. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  3177. } else {
  3178. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  3179. }
  3180. })
  3181. json += "}"
  3182. let s = eval("(" + json + ")")
  3183. return s
  3184. },
  3185. tableRowClassName ({row, rowIndex}) {
  3186. if (row.qtyToIssueOriginal<row.qtyToIssue&&new Date(row.needDate)<new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
  3187. return 'error-row'
  3188. }
  3189. return ''
  3190. },
  3191. onMaterialTypeChange(value) {
  3192. // 清空相关字段
  3193. this.orderDetailData.orderNo = '';
  3194. this.orderDetailData.seqNo = '';
  3195. this.orderDetailData.operationNo = '';
  3196. this.orderDetailData.partNo = '';
  3197. this.orderDetailData.partDesc = '';
  3198. this.orderDetailData.locationNo = '';
  3199. this.orderDetailData.resourceId = '';
  3200. this.orderDetailData.resourceDesc = '';
  3201. this.orderDetailData.qtyRequired = '';
  3202. this.orderDetailData.itemDesc = '';
  3203. this.orderDetailData.itemNo = '';
  3204. this.orderDetailData.workCenterNo = '';
  3205. this.orderDetailData.issureQty = 0;
  3206. this.orderDetailData.alreadyApplyTotal = 0;
  3207. },
  3208. //派工单选择部分
  3209. openChooseSOSModal() {
  3210. // 检查是否选择了主表行
  3211. if (!this.currentRow || !this.currentRow.notifyNo) {
  3212. this.$alert('请先选择一条主表记录!', '提示', {
  3213. confirmButtonText: '确定'
  3214. })
  3215. return false
  3216. }
  3217. this.ss_totalPage= 0;
  3218. // 初始化选择派工单数据
  3219. this.chooseSOSData = {
  3220. page: 1,
  3221. limit: 100,
  3222. site: this.currentRow.site,
  3223. bu: this.currentRow.bu,
  3224. orderNo: '',
  3225. seqNo: '',
  3226. sResourceid: '',
  3227. startDate: this.dayjs().format('YYYY-MM-DD'),
  3228. endDate: this.dayjs().format('YYYY-MM-DD'),
  3229. }
  3230. // 清空选择列表
  3231. this.chooseSOSList = []
  3232. // 打开选择模态框
  3233. this.chooseSOSModalFlag = true
  3234. },
  3235. searchSOSRouting() {
  3236. this.chooseSOSData.limit = this.ss_pageSize
  3237. this.chooseSOSData.page = this.ss_pageIndex
  3238. // 调用API查询派工单信息
  3239. getSOScheduledRoutingListForIssureByPaging(this.chooseSOSData).then(({data}) => {
  3240. if (data.code === 0) {
  3241. this.chooseSOSList = data.page.list;
  3242. if (this.chooseSOSList.length === 0) {
  3243. this.$message.warning('未查询到符合条件的派工单');
  3244. }
  3245. this.ss_pageIndex = data.page.currPage
  3246. this.ss_pageSize = data.page.pageSize
  3247. this.ss_totalPage = data.page.totalCount
  3248. } else {
  3249. // 清空选择列表
  3250. this.chooseSOSList = []
  3251. this.$message.error(data.msg || '查询失败');
  3252. }
  3253. }).catch(error => {
  3254. // 清空选择列表
  3255. this.chooseSOSList = []
  3256. console.error('查询派工单失败:', error);
  3257. this.$message.error('查询失败,请稍后重试');
  3258. });
  3259. },
  3260. // 每页数 工单分页信息
  3261. ss_sizeChangeHandle(val) {
  3262. this.ss_pageSize = val
  3263. this.ss_pageIndex = 1
  3264. this.searchSOSRouting()
  3265. },
  3266. // 当前页 工单分页信息
  3267. ss_currentChangeHandle(val) {
  3268. this.ss_pageIndex = val
  3269. this.searchSOSRouting()
  3270. },
  3271. chooseSOS(row) {
  3272. // 关闭选择模态框
  3273. this.chooseSOSModalFlag = false
  3274. // 将选择的数据填入到保存派工单模态框中
  3275. this.orderDetailData.orderNo = row.orderno || '';
  3276. this.orderDetailData.seqNo = row.seqno || '';
  3277. this.orderDetailData.itemNo = row.itemno || '';
  3278. this.orderDetailData.itemDesc = row.itemDesc || '';
  3279. this.orderDetailData.resourceId = row.sResourceid || '';
  3280. this.orderDetailData.resourceDesc = row.resourceDesc || '';
  3281. this.orderDetailData.qtyRequired = row.qtyrequired || '';
  3282. this.orderDetailData.partDesc = row.partDesc || '';
  3283. this.orderDetailData.partNo = row.partNo || '';
  3284. this.orderDetailData.workCenterNo = row.sWorkcenterno || '';
  3285. this.orderDetailData.alreadyApplyTotal = row.alreadyApplyTotal || 0;
  3286. this.orderDetailData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm:ss');
  3287. // 根据物料类型设置
  3288. if (row.issueType === '非BOM物料') {
  3289. this.orderDetailData.materialType = '非BOM物料';
  3290. } else {
  3291. this.orderDetailData.materialType = 'BOM物料';
  3292. }
  3293. this.$message.success('选择派工单成功,数据已填入表单');
  3294. },
  3295. //工单选择部分
  3296. // 打开选择工单模态框
  3297. openChooseOrderModal() {
  3298. // 检查是否选择了主表行
  3299. if (!this.currentRow || !this.currentRow.notifyNo) {
  3300. this.$alert('请先选择一条主表记录!', '提示', {
  3301. confirmButtonText: '确定'
  3302. })
  3303. return false
  3304. }
  3305. this.co_totalPage= 0;
  3306. // 初始化选择工单数据
  3307. this.chooseOrderData = {
  3308. page: 1,
  3309. limit: 100,
  3310. site: this.currentRow.site,
  3311. buNo: this.currentRow.bu,
  3312. user: this.$store.state.user.name,
  3313. orderNo: '',
  3314. statusList: ['已下达', '已计划', '已排产'],
  3315. date3: this.dayjs().format('YYYY-MM-DD'),
  3316. date4: this.dayjs().format('YYYY-MM-DD'),
  3317. }
  3318. // 清空选择列表
  3319. this.chooseOrderList = []
  3320. // 打开选择模态框
  3321. this.chooseOrderModalFlag = true
  3322. },
  3323. // 查询工单信息
  3324. searchOrder() {
  3325. this.chooseOrderData.limit = this.co_pageSize
  3326. this.chooseOrderData.page = this.co_pageIndex
  3327. searchShopOrderByPaging(this.chooseOrderData).then(({data}) => {
  3328. if (data.code === 0) {
  3329. this.chooseOrderList = data.page.list;
  3330. if (this.chooseOrderList.length === 0) {
  3331. this.$message.warning('未查询到符合条件的工单');
  3332. }
  3333. this.co_pageIndex = data.page.currPage
  3334. this.co_pageSize = data.page.pageSize
  3335. this.co_totalPage = data.page.totalCount
  3336. } else {
  3337. this.chooseOrderList = [];
  3338. this.$message.error(data.msg || '查询失败');
  3339. }
  3340. }).catch(error => {
  3341. this.chooseOrderList = [];
  3342. console.error('查询工单失败:', error);
  3343. this.$message.error('查询失败,请稍后重试');
  3344. });
  3345. },
  3346. // 每页数 工单分页信息
  3347. co_sizeChangeHandle(val) {
  3348. this.co_pageSize = val
  3349. this.co_pageIndex = 1
  3350. this.searchOrder()
  3351. },
  3352. // 当前页 工单分页信息
  3353. co_currentChangeHandle(val) {
  3354. this.co_pageIndex = val
  3355. this.searchOrder()
  3356. },
  3357. // 选择工单
  3358. chooseOrder(row) {
  3359. // 关闭选择模态框
  3360. this.chooseOrderModalFlag = false
  3361. // 将选择的数据填入到保存派工单模态框中
  3362. this.orderDetailData.orderNo = row.orderNo || '';
  3363. this.orderDetailData.partNo = row.partNo || '';
  3364. this.orderDetailData.partDesc = row.partDescription || '';
  3365. this.orderDetailData.qtyRequired = row.lotSize || '';
  3366. this.orderDetailData.alreadyApplyTotal = row.alreadyApplyTotal || 0;
  3367. this.orderDetailData.apsResourceTotal = row.apsResourceTotal || 0;
  3368. this.orderDetailData.notYetStartedResourceTotal = row.notYetStartedResourceTotal || 0;
  3369. // 清空相关字段
  3370. this.orderDetailData.seqNo = '';
  3371. this.orderDetailData.operationNo = '';
  3372. this.orderDetailData.locationNo = '';
  3373. },
  3374. //工序选择部分
  3375. // 打开选择工序模态框
  3376. openChooseOperationModal() {
  3377. // 检查是否选择了工单
  3378. if (!this.orderDetailData.orderNo) {
  3379. this.$alert('请先选择工单!', '提示', {
  3380. confirmButtonText: '确定'
  3381. })
  3382. return false
  3383. }
  3384. // 初始化选择工序数据
  3385. this.chooseOperationData = {
  3386. orderNo: this.orderDetailData.orderNo,
  3387. site: this.currentRow.site,
  3388. }
  3389. // 清空选择列表
  3390. this.chooseOperationList = []
  3391. //
  3392. this.searchOperation();
  3393. // 打开选择模态框
  3394. this.chooseOperationModalFlag = true
  3395. },
  3396. // 查询工序信息
  3397. searchOperation() {
  3398. // 调用API查询工序信息
  3399. getRouteInShopOrder(this.chooseOperationData).then(({data}) => {
  3400. if (data.code === 0) {
  3401. this.chooseOperationList = data.dataList;
  3402. if (this.chooseOperationList.length === 0) {
  3403. this.$message.warning('未查询到符合条件的工序');
  3404. }
  3405. } else {
  3406. // 清空选择列表
  3407. this.chooseOperationList = [];
  3408. this.$message.error(data.msg || '查询失败');
  3409. }
  3410. }).catch(error => {
  3411. // 清空选择列表
  3412. this.chooseOperationList = [];
  3413. console.error('查询工序失败:', error);
  3414. this.$message.error('查询失败,请稍后重试');
  3415. });
  3416. },
  3417. // 选择工序
  3418. chooseOperation(row) {
  3419. // 关闭选择模态框
  3420. this.chooseOperationModalFlag = false
  3421. // 将选择的数据填入到保存派工单模态框中
  3422. this.orderDetailData.itemDesc = row.operationDesc || '';
  3423. this.orderDetailData.itemNo = row.itemNo || '';
  3424. this.orderDetailData.workCenterNo = row.workCenterNo || '';
  3425. this.$message.success('操作成功');
  3426. },
  3427. //机台选择部分
  3428. // 打开选择机台模态框
  3429. openChooseResourceModal() {
  3430. // 检查是否选择了工单
  3431. if (!this.orderDetailData.orderNo) {
  3432. this.$alert('请先选择工单!', '提示', {
  3433. confirmButtonText: '确定'
  3434. })
  3435. return false
  3436. }
  3437. // 初始化选择机台数据
  3438. this.chooseResourceData = {
  3439. site: this.currentRow.site,
  3440. workCenterNo: this.orderDetailData.workCenterNo,
  3441. resourceID: '',
  3442. resourceDesc: '',
  3443. }
  3444. // 清空选择列表
  3445. this.chooseResourceList = []
  3446. this.searchResource();
  3447. // 打开选择模态框
  3448. this.chooseResourceModalFlag = true
  3449. },
  3450. // 查询机台信息
  3451. searchResource() {
  3452. // 调用API查询机台信息
  3453. searchAllResource(this.chooseResourceData).then(({data}) => {
  3454. if (data.code === 0) {
  3455. this.chooseResourceList = data.rows;
  3456. if (this.chooseResourceList.length === 0) {
  3457. this.$message.warning('未查询到符合条件的机台');
  3458. }
  3459. } else {
  3460. // 清空选择列表
  3461. this.chooseResourceList = [];
  3462. this.$message.error(data.msg || '查询失败');
  3463. }
  3464. }).catch(error => {
  3465. // 清空选择列表
  3466. this.chooseResourceList = [];
  3467. console.error('查询机台失败:', error);
  3468. this.$message.error('查询失败,请稍后重试');
  3469. });
  3470. },
  3471. // 选择机台
  3472. chooseResource(row) {
  3473. // 关闭选择模态框
  3474. this.chooseResourceModalFlag = false
  3475. // 将选择的数据填入到保存派工单模态框中
  3476. this.orderDetailData.resourceId = row.resourceId || '';
  3477. this.orderDetailData.resourceDesc = row.resourceDesc || '';
  3478. this.$message.success('操作成功');
  3479. },
  3480. //非BOM物料选择部分
  3481. // 打开选择物料模态框
  3482. openChoosePartModal() {
  3483. // 检查是否选择了主表行
  3484. if (!this.currentRow || !this.currentRow.notifyNo) {
  3485. this.$alert('请先选择一条主表记录!', '提示', {
  3486. confirmButtonText: '确定'
  3487. })
  3488. return false
  3489. }
  3490. // 初始化选择物料数据
  3491. this.choosePartData = {
  3492. site: this.currentRow.site,
  3493. sourceBu: this.currentRow.bu,
  3494. partNo: '',
  3495. partDesc: '',
  3496. spec: '',
  3497. }
  3498. // 清空选择列表
  3499. this.choosePartList = []
  3500. // 打开选择模态框
  3501. this.choosePartModalFlag = true
  3502. this.searchPartModel()
  3503. },
  3504. // 查询物料信息
  3505. searchPartModel() {
  3506. this.choosePartData.limit = this.pp_pageSize
  3507. this.choosePartData.page = this.pp_pageIndex
  3508. // 调用API查询物料信息
  3509. getPartListByPaging(this.choosePartData).then(({data}) => {
  3510. if (data.code === 0) {
  3511. this.choosePartList = data.page.list;
  3512. if (this.choosePartList.length === 0) {
  3513. this.$message.warning('未查询到符合条件的物料');
  3514. }
  3515. this.pp_pageIndex = data.page.currPage
  3516. this.pp_pageSize = data.page.pageSize
  3517. this.pp_totalPage = data.page.totalCount
  3518. } else {
  3519. // 清空选择列表
  3520. this.choosePartList = []
  3521. this.$message.error(data.msg || '查询失败');
  3522. }
  3523. }).catch(error => {
  3524. // 清空选择列表
  3525. this.choosePartList = []
  3526. console.error('查询物料失败:', error);
  3527. this.$message.error('查询失败,请稍后重试');
  3528. });
  3529. },
  3530. // 每页数 工单分页信息
  3531. pp_sizeChangeHandle(val) {
  3532. this.pp_pageSize = val
  3533. this.pp_pageIndex = 1
  3534. this.searchPartModel()
  3535. },
  3536. // 当前页 工单分页信息
  3537. pp_currentChangeHandle(val) {
  3538. this.pp_pageIndex = val
  3539. this.searchPartModel()
  3540. },
  3541. // 选择物料
  3542. choosePart(row) {
  3543. // 关闭选择模态框
  3544. this.choosePartModalFlag = false
  3545. // 将选择的数据填入到保存派工单模态框中
  3546. this.orderDetailData.partNo = row.partNo || '';
  3547. this.orderDetailData.partDesc = row.partDesc || '';
  3548. this.orderDetailData.materialType = '非BOM物料';
  3549. this.$message.success('选择物料成功,数据已填入表单');
  3550. },
  3551. //提交申请单方法
  3552. async submitNotifyModel(row){
  3553. // 设置当前行为要提交的行
  3554. this.currentRow = JSON.parse(JSON.stringify(row));
  3555. // 先刷新子表数据,确保获取最新数据
  3556. await this.refreshAllSubTables();
  3557. console.log('申请单明细数据:', this.dataList2);
  3558. console.log('材料明细数据:', this.dataList3);
  3559. if(this.dataList2.length==0 || this.dataList3.length==0){
  3560. this.$alert('没有明细记录无法提交!', '提示', {
  3561. confirmButtonText: '确定'
  3562. })
  3563. return false
  3564. }
  3565. // 调用更新状态接口,将状态改为"待确认"
  3566. let inData = {
  3567. site: row.site,
  3568. notifyNo: row.notifyNo,
  3569. status: '待确认',
  3570. }
  3571. updateNotifyStatus(inData).then(({data})=>{
  3572. if (data.code === 0) {
  3573. //刷新主表数据
  3574. this.searchTable().then(() => { // 等刷新完成
  3575. const foundRow = this.dataList.find(item => item.notifyNo === row.notifyNo);
  3576. if (foundRow) {
  3577. this.currentRow = JSON.parse(JSON.stringify(foundRow));
  3578. this.$nextTick(() => {
  3579. this.$refs.mainTable.setCurrentRow(foundRow);
  3580. });
  3581. }
  3582. });
  3583. this.$message.success('提交成功')
  3584. }else {
  3585. this.$alert(data.msg, '错误', {
  3586. confirmButtonText: '确定'
  3587. })
  3588. }
  3589. })
  3590. },
  3591. //下达申请单方法
  3592. async xiadaNotifyModel(row){
  3593. // 设置当前行为要下达的行
  3594. this.currentRow = JSON.parse(JSON.stringify(row));
  3595. // 先刷新子表数据,确保获取最新数据
  3596. await this.refreshAllSubTables();
  3597. console.log('申请单明细数据:', this.dataList2);
  3598. console.log('材料明细数据:', this.dataList3);
  3599. if(this.dataList2.length==0 || this.dataList3.length==0){
  3600. this.$alert('没有明细记录无法下达!!', '提示', {
  3601. confirmButtonText: '确定'
  3602. })
  3603. return false
  3604. }
  3605. xiadaNotify(row).then(({data})=>{
  3606. if (data.code === 0) {
  3607. //刷新主表数据
  3608. this.searchTable().then(() => { // 等刷新完成
  3609. const foundRow = this.dataList.find(item => item.notifyNo === row.notifyNo);
  3610. if (foundRow) {
  3611. this.currentRow = JSON.parse(JSON.stringify(foundRow));
  3612. this.$nextTick(() => {
  3613. this.$refs.mainTable.setCurrentRow(foundRow);
  3614. });
  3615. }
  3616. });
  3617. this.$message.success( '操作成功')
  3618. }else {
  3619. this.$alert(data.msg, '错误', {
  3620. confirmButtonText: '确定'
  3621. })
  3622. }
  3623. })
  3624. },
  3625. // 刷新所有子表数据
  3626. async refreshAllSubTables() {
  3627. if(!this.currentRow || !this.currentRow.notifyNo) {
  3628. console.warn('当前行数据为空,无法刷新子表数据');
  3629. return;
  3630. }
  3631. try {
  3632. // 并行请求所有子表数据
  3633. const [detailData, materialData] = await Promise.all([
  3634. searchNotifyOrderList(this.currentRow),
  3635. searchNotifyMaterialList(this.currentRow)
  3636. ]);
  3637. // 更新申请单明细数据
  3638. if (detailData.data && detailData.data.code == 0) {
  3639. this.dataList2 = detailData.data.rows;
  3640. } else {
  3641. this.dataList2 = [];
  3642. }
  3643. // 更新材料明细数据
  3644. if (materialData.data && materialData.data.code == 0) {
  3645. this.dataList3 = materialData.data.rows;
  3646. } else {
  3647. this.dataList3 = [];
  3648. }
  3649. } catch (error) {
  3650. console.error('刷新子表数据失败:', error);
  3651. this.$message.error('刷新子表数据失败,请稍后重试');
  3652. }
  3653. },
  3654. editNotifyMaterialFun(row){
  3655. // 设置当前行为要编辑的行
  3656. this.currentRow = JSON.parse(JSON.stringify(row));
  3657. editNotifyMaterial(row).then(({data})=>{
  3658. if (data.code === 0) {
  3659. //刷新主表数据
  3660. this.searchTable().then(() => { // 等刷新完成
  3661. const foundRow = this.dataList.find(item => item.notifyNo === row.notifyNo);
  3662. if (foundRow) {
  3663. this.currentRow = JSON.parse(JSON.stringify(foundRow));
  3664. this.$nextTick(() => {
  3665. this.$refs.mainTable.setCurrentRow(foundRow);
  3666. });
  3667. }
  3668. });
  3669. this.$message.success( '操作成功')
  3670. }else {
  3671. this.$alert(data.msg, '错误', {
  3672. confirmButtonText: '确定'
  3673. })
  3674. }
  3675. })
  3676. },
  3677. // 判断当前状态是否可编辑
  3678. isEditableStatus() {
  3679. if (!this.currentRow || !this.currentRow.status) {
  3680. return false;
  3681. }
  3682. return this.currentRow.status === '草稿' || this.currentRow.status === '编辑中' || this.currentRow.status === '待确认';
  3683. },
  3684. // 计算申请数量
  3685. calculateQtyToIssue(row) {
  3686. const componentScrap = parseFloat(row.componentScrap) || 0;
  3687. const firstInspectionQty = parseFloat(row.firstInspectionQty) || 0;
  3688. const standardDosage = parseFloat(row.standardDosage) || 0;
  3689. return (componentScrap + firstInspectionQty + standardDosage).toFixed(2);
  3690. },
  3691. // 更新申请数量
  3692. updateQtyToIssue(row) {
  3693. const componentScrap = parseFloat(row.componentScrap) || 0;
  3694. const firstInspectionQty = parseFloat(row.firstInspectionQty) || 0;
  3695. const standardDosage = parseFloat(row.standardDosage) || 0;
  3696. // 使用 $set 确保响应式更新
  3697. this.$set(row, 'qtyToIssue', (componentScrap + firstInspectionQty + standardDosage).toFixed(2));
  3698. },
  3699. // 打开新增材料模态框
  3700. addMaterialModal() {
  3701. if (!this.currentRow || !this.currentRow.notifyNo) {
  3702. this.$alert('请先选择一条主表记录!', '提示', {
  3703. confirmButtonText: '确定'
  3704. });
  3705. return false;
  3706. }
  3707. if (!this.isEditableStatus()) {
  3708. this.$alert('当前状态不允许编辑!只有草稿、编辑中或待确认状态才能新增材料。', '提示', {
  3709. confirmButtonText: '确定'
  3710. });
  3711. return false;
  3712. }
  3713. // 重置表单数据
  3714. this.newMaterialData = {
  3715. componentPartNo: '',
  3716. partDesc: '',
  3717. issueType: '替代料',
  3718. orderNo: '',
  3719. itemNo: '', // 申请单序号,将在选择生产订单时自动填充
  3720. remark: '',
  3721. componentScrap: 0,
  3722. firstInspectionQty: 0,
  3723. standardDosage: 0,
  3724. bomSeqNo: '',
  3725. warehouseId: '',
  3726. qtyToIssueOriginal: 0
  3727. };
  3728. // 加载生产订单选项
  3729. this.loadOrderOptions();
  3730. this.addMaterialModalFlag = true;
  3731. },
  3732. // 加载生产订单选项
  3733. loadOrderOptions() {
  3734. // 从申请单明细中获取生产订单列表
  3735. this.orderOptions = this.dataList2.map(item => ({
  3736. orderNo: item.sOOrderNo,
  3737. itemNo: item.itemNo // 添加申请单序号
  3738. }));
  3739. },
  3740. // 生产订单选择变化时的处理
  3741. onOrderNoChange(selectedOrderNo) {
  3742. if (selectedOrderNo) {
  3743. // 根据选择的生产订单,从申请单明细中找到对应的申请单序号
  3744. const selectedOrder = this.dataList2.find(item => item.sOOrderNo === selectedOrderNo);
  3745. if (selectedOrder) {
  3746. this.newMaterialData.itemNo = selectedOrder.itemNo;
  3747. }
  3748. } else {
  3749. this.newMaterialData.itemNo = '';
  3750. }
  3751. },
  3752. // 保存新增材料
  3753. saveNewMaterial() {
  3754. // 验证必填字段
  3755. if (!this.newMaterialData.componentPartNo) {
  3756. this.$message.error('请选择材料编码')
  3757. return;
  3758. }
  3759. if (!this.newMaterialData.orderNo) {
  3760. this.$message.error('请选择生产订单')
  3761. return;
  3762. }
  3763. // 计算申请数量
  3764. const qtyToIssue = this.calculateQtyToIssue(this.newMaterialData)
  3765. // 构建保存数据
  3766. const saveData = {
  3767. ...this.newMaterialData,
  3768. site: this.currentRow.site,
  3769. notifyNo: this.currentRow.notifyNo,
  3770. qtyToIssue: qtyToIssue,
  3771. }
  3772. saveSOIssueNotifyOrderMateria(saveData).then(({data}) => {
  3773. if (data && data.code === 0) {
  3774. // 刷新材料明细列表
  3775. this.getNotifyMaterialList();
  3776. this.addMaterialModalFlag = false
  3777. this.$message.success('操作成功')
  3778. } else {
  3779. this.$message.error(data.msg)
  3780. }
  3781. })
  3782. },
  3783. // 查询替代料
  3784. getAlternativePart(row) {
  3785. if (!this.currentRow || !this.currentRow.notifyNo) {
  3786. this.$message.warning('请先选择一条申请单记录!');
  3787. return;
  3788. }
  3789. if (!row.orderNo) {
  3790. this.$message.warning('该记录没有关联工单,无法查询替代料!');
  3791. return;
  3792. }
  3793. const params = {
  3794. site: row.site,
  3795. notifyNo: row.notifyNo,
  3796. orderNo: row.orderNo,
  3797. componentPart: row.componentPartNo
  3798. };
  3799. this.alternativePartsLoading = true;
  3800. this.alternativePartsModalFlag = true;
  3801. getBomAlternativeParts(params).then(({data}) => {
  3802. if (data && data.code === 0) {
  3803. this.alternativePartsList = data.rows || []
  3804. } else {
  3805. this.$message.error(data.msg || '查询替代料失败');
  3806. this.alternativePartsList = [];
  3807. }
  3808. }).finally(() => {
  3809. this.alternativePartsLoading = false;
  3810. });
  3811. },
  3812. // 获取基础数据列表S
  3813. getBaseList (val, type) {
  3814. this.tagNo = val
  3815. this.tagType = type
  3816. this.$nextTick(() => {
  3817. let strVal = ''
  3818. if (val === 508) {
  3819. strVal = this.newMaterialData.componentPartNo
  3820. this.$refs.baseList.init(val, strVal)
  3821. }
  3822. })
  3823. },
  3824. // 列表方法的回调
  3825. getBaseData (val) {
  3826. if (this.tagNo === 508) {
  3827. this.newMaterialData.componentPartNo = val.PartNo
  3828. this.newMaterialData.partDesc = val.PartDescription
  3829. this.newMaterialData.warehouseId = val.outbound_warehouse_id
  3830. }
  3831. },
  3832. // 输入校验
  3833. partBlur (tagNo) {
  3834. let tempData = {
  3835. tagno: tagNo,
  3836. conditionSql: " and PartNo = '" + this.newMaterialData.componentPartNo + "'" + " and site = '" + this.newMaterialData.site + "'"
  3837. }
  3838. verifyData(tempData).then(({data}) => {
  3839. if (data && data.code === 0) {
  3840. if (data.baseListData.length > 0) {
  3841. this.newMaterialData.componentPartNo = data.baseListData[0].PartNo
  3842. this.newMaterialData.partDesc = data.baseListData[0].PartDescription
  3843. } else {
  3844. this.newMaterialData.partDesc = ''
  3845. }
  3846. }
  3847. })
  3848. },
  3849. },
  3850. }
  3851. </script>
  3852. <style scoped>
  3853. /deep/ .customer-tab .el-tabs__content {
  3854. padding: 5px !important;
  3855. }
  3856. .disabled {
  3857. cursor: not-allowed !important;
  3858. color: #C0C4CC !important;
  3859. pointer-events: none;
  3860. }
  3861. .text-right >>> .el-input__inner {
  3862. text-align: right !important;
  3863. }
  3864. .text-right >>> .el-input-number__input {
  3865. text-align: right !important;
  3866. }
  3867. .single-line-multi-select >>> .el-select__tags {
  3868. display: flex;
  3869. flex-wrap: nowrap;
  3870. overflow: hidden;
  3871. white-space: nowrap;
  3872. max-width: 100%;
  3873. }
  3874. .single-line-multi-select >>> .el-tag {
  3875. flex-shrink: 0;
  3876. max-width: 100px;
  3877. overflow: hidden;
  3878. text-overflow: ellipsis;
  3879. white-space: nowrap;
  3880. }
  3881. .single-line-multi-select >>> .el-select__input {
  3882. flex-shrink: 0;
  3883. min-width: 30px;
  3884. }
  3885. .disabled-link {
  3886. cursor: not-allowed !important;
  3887. color: #C0C4CC !important;
  3888. pointer-events: none;
  3889. }
  3890. .disabled-text {
  3891. color: #C0C4CC !important;
  3892. cursor: not-allowed !important;
  3893. }
  3894. .el-table /deep/ .cell{
  3895. height: auto;
  3896. line-height: 1.5;
  3897. }
  3898. </style>