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.

2147 lines
69 KiB

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