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
71 KiB

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