赫艾前端
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.

1152 lines
44 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" >
  4. <el-form-item :label="'工厂编码'">
  5. <el-input v-model="searchData.site" style="width: 130px"></el-input>
  6. </el-form-item>
  7. <el-form-item :label="'生产订单号'">
  8. <el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
  9. </el-form-item>
  10. <el-form-item >
  11. <span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码</a></span>
  12. <el-input v-model="searchData.sWorkCenterNo" style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item >
  15. <span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span>
  16. <el-input v-model="searchData.partNo" style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'工序名称'">
  19. <el-input v-model="searchData.itemDesc" style="width: 120px"></el-input>
  20. </el-form-item>
  21. <el-form-item :label="'派工单类型'">
  22. <el-select v-model="searchData.scheduleType" style="width: 120px">
  23. <el-option label="全部" value=""></el-option>
  24. <el-option label="生产订单派工单" value="生产订单派工单"></el-option>
  25. <el-option label="日计划派工单" value="日计划派工单"></el-option>
  26. </el-select>
  27. </el-form-item>
  28. <el-form-item :label="'派工单是否关闭'">
  29. <el-select v-model="searchData.reportFlag" style="width: 120px">
  30. <el-option label="全部" value=""></el-option>
  31. <el-option label="是" value="closedFlag='Y'"></el-option>
  32. <el-option label="否" value="closedFlag='N'"></el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-form>
  36. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  37. <el-form-item :label="'派工日期:'">
  38. <el-date-picker
  39. style="width: 130px"
  40. v-model="searchData.startDate"
  41. value-format="yyyy-MM-dd"
  42. placeholder="选择日期">
  43. </el-date-picker>
  44. </el-form-item>
  45. <el-form-item :label="'至: '">
  46. <el-date-picker
  47. style="width: 130px"
  48. v-model="searchData.endDate"
  49. type="date"
  50. value-format="yyyy-MM-dd"
  51. placeholder="选择日期">
  52. </el-date-picker>
  53. </el-form-item>
  54. <el-form-item >
  55. <span slot="label" style="" @click="getBaseList(26,3)"><a herf="#">操作员姓名</a></span>
  56. <el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
  57. </el-form-item>
  58. <el-form-item >
  59. <span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台ID</a></span>
  60. <el-input v-model="searchData.sResourceID" style="width: 120px"></el-input>
  61. </el-form-item>
  62. <el-form-item :label="'班次'">
  63. <el-select v-model="searchData.sShiftNo" style="width: 120px">
  64. <el-option label="全部" value=""></el-option>
  65. <el-option label="白班" value="白班"></el-option>
  66. <el-option label="晚班" value="晚班"></el-option>
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item :label="' '">
  70. <el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
  71. <download-excel
  72. :fields="exportDataStandard"
  73. :data="tableData"
  74. type="xlsx"
  75. :name="exportName"
  76. :header="exportHeader"
  77. :footer="exportFooter"
  78. :defaultValue="exportDefaultValue"
  79. :fetch="createExportData"
  80. :before-generate="startDownload"
  81. :before-finish="finishDownload"
  82. worksheet="导出信息"
  83. class="el-button el-button--primary el-button--medium">
  84. {{'导出'}}
  85. </download-excel>
  86. </el-form-item>
  87. </el-form>
  88. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  89. <el-form-item :label="' '">
  90. <el-button @click="openStart()" style="margin-left: 0px;margin-top:0px" type="primary">派工单开始</el-button>
  91. <el-button @click="openScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单报工</el-button>
  92. <el-button @click="stopScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单暂停</el-button>
  93. <el-button @click="continueScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单继续</el-button>
  94. <download-excel
  95. :fields="exportDataStandard"
  96. :data="tableData"
  97. type="xlsx"
  98. :name="exportName"
  99. :header="exportHeader"
  100. :footer="exportFooter"
  101. :defaultValue="exportDefaultValue"
  102. :fetch="createExportData"
  103. :before-generate="startDownload"
  104. :before-finish="finishDownload"
  105. worksheet="导出信息"
  106. class="el-button el-button--primary el-button--medium">
  107. {{'导出'}}
  108. </download-excel>
  109. </el-form-item>
  110. </el-form>
  111. <el-table
  112. :height="height"
  113. :data="tableData"
  114. border
  115. style="width: 100%">
  116. <el-table-column
  117. prop=""
  118. header-align="center"
  119. align="center"
  120. min-width="100"
  121. label="操作">
  122. <template slot-scope="scope" class="foo_container">
  123. <a type="text" size="small" @click="initReportModal(scope.row)">报工</a>
  124. <a type="text" size="small" @click="SOPModal2(scope.row)">查看SOP</a>
  125. </template>
  126. </el-table-column>
  127. <el-table-column
  128. prop="site"
  129. header-align="center"
  130. align="left"
  131. min-width="60"
  132. label="工厂编码">
  133. </el-table-column>
  134. <el-table-column
  135. prop="seqNo"
  136. header-align="center"
  137. align="left"
  138. min-width="70"
  139. label="派工单号">
  140. </el-table-column>
  141. <el-table-column
  142. prop="orderNo"
  143. header-align="center"
  144. align="left"
  145. min-width="100"
  146. label="生产订单号">
  147. </el-table-column>
  148. <el-table-column
  149. prop="scheduleType"
  150. header-align="center"
  151. align="left"
  152. min-width="100"
  153. label="派工单类型">
  154. </el-table-column>
  155. <el-table-column
  156. prop="itemNo"
  157. header-align="center"
  158. align="left"
  159. min-width="70"
  160. label="工序号">
  161. </el-table-column>
  162. <el-table-column
  163. prop="itemDesc"
  164. header-align="center"
  165. align="left"
  166. min-width="160"
  167. label="工序名称">
  168. </el-table-column>
  169. <el-table-column
  170. prop="qtyRequired"
  171. header-align="center"
  172. align="right"
  173. min-width="80"
  174. label="派工数量">
  175. </el-table-column>
  176. <el-table-column
  177. prop="weight"
  178. header-align="center"
  179. align="right"
  180. min-width="80"
  181. label="参考重量">
  182. </el-table-column>
  183. <el-table-column
  184. prop="qtyReported"
  185. header-align="center"
  186. align="right"
  187. min-width="80"
  188. label="报工数量">
  189. </el-table-column>
  190. <el-table-column
  191. prop="qtyApprove"
  192. header-align="center"
  193. align="right"
  194. min-width="80"
  195. label="合格数量">
  196. </el-table-column>
  197. <el-table-column
  198. prop="timeRequired"
  199. header-align="center"
  200. align="right"
  201. min-width="80"
  202. label="需求时间">
  203. </el-table-column>
  204. <el-table-column
  205. prop="sScheduledDate"
  206. header-align="center"
  207. align="left"
  208. min-width="80"
  209. label="派工日期">
  210. </el-table-column>
  211. <el-table-column
  212. prop="operatorName"
  213. header-align="center"
  214. align="left"
  215. min-width="80"
  216. label="操作员姓名">
  217. </el-table-column>
  218. <el-table-column
  219. prop="partNo"
  220. header-align="center"
  221. align="left"
  222. min-width="80"
  223. label="产品编码">
  224. </el-table-column>
  225. <el-table-column
  226. prop="partDesc"
  227. header-align="center"
  228. align="left"
  229. min-width="200"
  230. label="产品名称">
  231. </el-table-column>
  232. <el-table-column
  233. prop="sResourceID"
  234. header-align="center"
  235. align="left"
  236. min-width="70"
  237. label="机台ID">
  238. </el-table-column>
  239. <el-table-column
  240. prop="sShiftNo"
  241. header-align="center"
  242. align="left"
  243. min-width="70"
  244. label="班次">
  245. </el-table-column>
  246. <el-table-column
  247. prop="sWorkCenterNo"
  248. header-align="center"
  249. align="left"
  250. min-width="100"
  251. label="加工中心编码">
  252. </el-table-column>
  253. </el-table>
  254. <el-dialog title="扫描派工单" :close-on-click-modal="false" v-drag :visible.sync="scanModalFlag" width="215px" >
  255. <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
  256. <el-form-item :label="'派工单号:'">
  257. <el-input v-model="scanSeqNo" ref="input" type="number" style="width: 130px;" @keyup.enter.native="searchSeqNo()"></el-input>
  258. </el-form-item>
  259. </el-form>
  260. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  261. <el-button type="primary" @click="searchSeqNo()">搜索</el-button>
  262. <el-button type="primary" @click="scanModalFlag = false">关闭</el-button>
  263. </el-footer>
  264. </el-dialog>
  265. <el-dialog title="开始派工单" :close-on-click-modal="false" v-drag :visible.sync="startModalFlag" width="215px">
  266. <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
  267. <el-form-item :label="'派工单号:'">
  268. <el-input v-model="scanSeqNo" ref="start" type="number" style="width: 130px;" @keyup.enter.native="startSeqNo()"></el-input>
  269. </el-form-item>
  270. </el-form>
  271. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  272. <el-button type="primary" @click="startSeqNo()">开始</el-button>
  273. <el-button type="primary" @click="startModalFlag = false">关闭</el-button>
  274. </el-footer>
  275. </el-dialog>
  276. <el-dialog title="派工单暂停" :close-on-click-modal="false" v-drag :visible.sync="stopModalFlag" width="215px">
  277. <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
  278. <el-form-item :label="'派工单号:'">
  279. <el-input v-model="scanSeqNo" ref="stop" type="number" style="width: 130px;" @keyup.enter.native="stopWork()"></el-input>
  280. </el-form-item>
  281. </el-form>
  282. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  283. <el-button type="primary" @click="stopWork()">开始</el-button>
  284. <el-button type="primary" @click="stopModalFlag = false">关闭</el-button>
  285. </el-footer>
  286. </el-dialog>
  287. <el-dialog title="派工单继续" :close-on-click-modal="false" v-drag :visible.sync="continueModalFlag" width="215px">
  288. <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
  289. <el-form-item :label="'派工单号:'">
  290. <el-input v-model="scanSeqNo" ref="continue" type="number" style="width: 130px;" @keyup.enter.native="continueWork()"></el-input>
  291. </el-form-item>
  292. </el-form>
  293. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  294. <el-button type="primary" @click="continueWork()">开始</el-button>
  295. <el-button type="primary" @click="continueModalFlag = false">关闭</el-button>
  296. </el-footer>
  297. </el-dialog>
  298. <el-dialog @close="closeDialog" :close-on-click-modal="false" :close-on-press-escape="false" v-drag title="报告信息" :visible.sync="setUp.reviewFlag" width="615px">
  299. <el-form :inline="true" label-position="top">
  300. <el-form-item label="派工单号">
  301. <el-input style="width: 130px;" :disabled="setUp.disabled" onkeyup="this.value = this.value.toUpperCase()" v-model="saveHeaderData.seqNo"></el-input>
  302. </el-form-item>
  303. <el-form-item label="产品编码">
  304. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="saveHeaderData.partNo"></el-input>
  305. </el-form-item>
  306. <el-form-item label="产品名称/规格型号">
  307. <el-input style="width: 275px;" :disabled="setUp.disabled" v-model="saveHeaderData.partDescription"></el-input>
  308. </el-form-item>
  309. </el-form>
  310. <el-form :inline="true" label-position="top">
  311. <el-form-item label="工序号">
  312. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="saveHeaderData.itemNo"></el-input>
  313. </el-form-item>
  314. <el-form-item label="工序名称">
  315. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="saveHeaderData.operationDesc"></el-input>
  316. </el-form-item>
  317. <el-form-item label="加工中心编码">
  318. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="saveHeaderData.workCenterNo"></el-input>
  319. </el-form-item>
  320. <el-form-item label="加工中心名称">
  321. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="saveHeaderData.workCenterDesc"></el-input>
  322. </el-form-item>
  323. </el-form>
  324. <el-form :inline="true" label-position="top">
  325. <el-form-item>
  326. <span slot="label" style="" @click="getBaseList(26 ,1)"><a herf="#">操作员</a></span>
  327. <el-input style="width: 130px;" v-model="saveHeaderData.operatorId"></el-input>
  328. </el-form-item>
  329. <el-form-item label="操作员姓名">
  330. <el-input style="width: 130px;" v-model="saveHeaderData.operatorName"></el-input>
  331. </el-form-item>
  332. <el-form-item label="生产日期">
  333. <el-date-picker
  334. style="width: 130px"
  335. v-model="saveHeaderData.planStartTime"
  336. type="date"
  337. value-format="yyyy-MM-dd"
  338. format = "yyyy-MM-dd"
  339. placeholder="选择日期">
  340. </el-date-picker>
  341. </el-form-item>
  342. <el-form-item label="报告日期">
  343. <el-date-picker
  344. style="width: 130px"
  345. v-model="saveHeaderData.planFinishTime"
  346. type="date"
  347. value-format="yyyy-MM-dd"
  348. format = "yyyy-MM-dd"
  349. placeholder="选择日期">
  350. </el-date-picker>
  351. </el-form-item>
  352. </el-form>
  353. <el-form :inline="true" label-position="top">
  354. <el-form-item label="本工序报工数">
  355. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="qty1"></el-input>
  356. </el-form-item>
  357. <el-form-item label="上工序报工数">
  358. <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="qty2"></el-input>
  359. </el-form-item>
  360. <el-form-item label="单位重量">
  361. <el-input style="width: 130px;" disabled v-model="qty3"></el-input>
  362. </el-form-item>
  363. <el-form-item label="派工单数量">
  364. <el-input style="width: 130px;" disabled v-model="saveHeaderData.qtyRequire"></el-input>
  365. </el-form-item>
  366. </el-form>
  367. <el-form :inline="true" label-position="top">
  368. <el-form-item label="合格数量">
  369. <el-input type="number" style="width: 178px;" class="input_reight" v-model="saveHeaderData.qtyApprove" @blur="qtyApproveBlur()"></el-input>
  370. </el-form-item>
  371. <el-form-item label="不合格数量" >
  372. <el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" @blur="qtyReportedBlur()"></el-input>
  373. </el-form-item>
  374. <!-- <el-form-item label="返工数量" >-->
  375. <!-- <el-input type="number" style="width: 178px;" v-model="saveHeaderData.qtyRework" @blur="qtyReworkBlur()"></el-input>-->
  376. <!-- </el-form-item>-->
  377. <el-form-item label="硫化模数" >
  378. <el-input type="number" class="input_left" style="width: 178px;" v-model="moQty" @blur="moQtyBlur()"></el-input>
  379. </el-form-item>
  380. </el-form>
  381. <el-form :inline="true" label-position="top">
  382. <el-form-item label="合格重量(KG)">
  383. <el-input type="number" style="width: 178px;" class="input_reight" :disabled="factorFlag" v-model="KGApprove" @blur="KGApproveBlur()"></el-input>
  384. </el-form-item>
  385. <el-form-item label="不合格重量(KG)">
  386. <el-input type="number" class="input_left" style="width: 178px;" :disabled="factorFlag" v-model="KGReported" @blur="KGReportedBlur()"></el-input>
  387. </el-form-item>
  388. <el-form-item label="模具孔数">
  389. <el-input type="number" class="input_left" style="width: 178px;" disabled v-model="cavity" ></el-input>
  390. </el-form-item>
  391. <!-- <el-form-item label="返工重量(KG)" >-->
  392. <!-- <el-input type="number" style="width: 178px;" v-model="KGRework" :disabled="factorFlag" @blur="KGReworkBlur()"></el-input>-->
  393. <!-- </el-form-item>-->
  394. </el-form>
  395. <fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;">
  396. <legend class="customer-legend">不良品分析</legend>
  397. <el-form :inline="true" label-position="top">
  398. <el-form-item>
  399. <span slot="label" style="" @click="getBaseList(26 ,2)"><a herf="#">操作员</a></span>
  400. <el-input style="width: 178px;" v-model="saveHeaderData.operatorId2"></el-input>
  401. </el-form-item>
  402. <el-form-item label="操作员姓名">
  403. <el-input style="width: 178px;" v-model="saveHeaderData.operatorIdName2"></el-input>
  404. </el-form-item>
  405. <el-form-item label="报废原因">
  406. <el-input style="width: 178px;" v-model="saveHeaderData.scrapReason"></el-input>
  407. </el-form-item>
  408. </el-form>
  409. </fieldset>
  410. <el-form :inline="true" label-position="top">
  411. <el-form-item label="准备时间">
  412. <el-input type="number" style="width: 178px;text-align: right;" v-model="saveHeaderData.preparationTime" ></el-input> <!--oninput ="value=value.replace(/[^0-9.]/g,'')"-->
  413. <!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.preparationTime" size="medium" :min="0" :controls="false"></el-input-number>-->
  414. </el-form-item>
  415. <el-form-item label="制造时间">
  416. <el-input type="number" style="width: 178px;" disabled v-model="saveHeaderData.manufacturingTime"></el-input> <!--oninput ="value=value.replace(/[^0-9.]/g,'')"-->
  417. <!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.manufacturingTime" size="medium" :min="0" :controls="false"></el-input-number>-->
  418. </el-form-item>
  419. <el-form-item label="清理时间" label-width="0px">
  420. <el-input type="number" style="width: 178px;" v-model="saveHeaderData.cleaningTime"></el-input> <!--oninput ="value=value.replace(/[^0-9.]/g,'')"-->
  421. <!-- :min="0" 最小值 :controls="false" 隐藏减价按钮 -->
  422. <!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.cleaningTime" size="medium" :min="0" :controls="false"></el-input-number>-->
  423. </el-form-item>
  424. </el-form>
  425. <el-form :inline="true" label-position="top">
  426. <el-form-item label="停机原因">
  427. <el-input style="width: 560px;" v-model="saveHeaderData.shutdownReason"></el-input>
  428. </el-form-item>
  429. </el-form>
  430. <el-form :inline="true" label-position="top">
  431. <el-form-item label="备注">
  432. <el-input style="width: 560px;" v-model="saveHeaderData.remark"></el-input>
  433. </el-form-item>
  434. </el-form>
  435. <span slot="footer" class="dialog-footer">
  436. <el-button @click="SOPModal()" type="primary">查看SOP</el-button>
  437. <el-button @click="setUp.reviewFlag = false">取消</el-button>
  438. <el-button type="primary" :disabled="setUp.saveButton" @click="saveReport()">确定</el-button>
  439. </span>
  440. </el-dialog>
  441. <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag title="查看SOP" :visible.sync="sopFlag" width="80%">
  442. <el-row>
  443. <el-col :span="8">
  444. <div style="margin-top: 2%">
  445. <h5 style="margin-left: 0px;font-size: 20px">产品图片</h5>
  446. <el-form inline="true" style="margin-top: -5px;margin-left: 0px" label-position="top">
  447. <el-form-item :label="'工厂编号:'">
  448. <el-input v-model="sopData.site" readonly style="width: 120px"></el-input>
  449. </el-form-item>
  450. <el-form-item :label="'产品编码:'" style="margin-left: 20px">
  451. <el-input v-model="sopData.partNo" readonly style="width: 120px"></el-input>
  452. </el-form-item>
  453. </el-form>
  454. <el-form inline="true" style="margin-top: 20px;margin-left: 0px" label-position="top">
  455. <el-form-item :label="'产品名称/规格型号:'" style="font-size: 20px">
  456. <el-input v-model="partDescription" readonly style="width: 374px"></el-input>
  457. </el-form-item>
  458. </el-form>
  459. <el-form inline="true" style="margin-top: 20px;margin-left: 0px" label-position="top">
  460. <el-form-item :label="fileTitle">
  461. <el-input v-model="fileName" style="width: 374px" readonly></el-input>
  462. </el-form-item>
  463. </el-form>
  464. <el-form inline="true" style="margin-top: 20px;margin-left: 20px" label-position="top">
  465. <el-form-item :label="' '">
  466. <el-button @click="lastPicture()" type="primary">上一张</el-button>
  467. </el-form-item>
  468. <el-form-item :label="' '">
  469. <el-button @click="nextPicture()" type="primary">下一张</el-button>
  470. </el-form-item>
  471. <el-form-item :label="' '">
  472. <el-button @click="sopFlag=false" type="primary">关闭</el-button>
  473. </el-form-item>
  474. </el-form>
  475. </div>
  476. </el-col>
  477. <el-col :span="16">
  478. <div id="padPhoto" style="text-align: center;vertical-align:middle;" >
  479. <iframe :src="photoUrl" frameborder="0" width="100%" :height="height2"></iframe>
  480. </div>
  481. </el-col>
  482. </el-row>
  483. </el-dialog>
  484. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  485. </div>
  486. </template>
  487. <script>
  488. import {
  489. printTransNoLabel,
  490. } from "@/views/modules/production/print_transNo_label.js"
  491. import {
  492. getSOScheduleRoutingData
  493. , saveGenerateReportForSchedule,
  494. searchReportedQty,
  495. searchSeqNo,
  496. startSeqNo,
  497. stopWork,
  498. continueWork,
  499. } from '@/api/production/generateReport.js'
  500. import Chooselist from '@/views/modules/common/Chooselist'
  501. import {
  502. getPhotoAddressData
  503. } from '@/api/pad.js'
  504. export default {
  505. name: 'generateReport',
  506. components: {
  507. Chooselist
  508. },
  509. data () {
  510. return {
  511. moQty:'',
  512. cavity:'',
  513. setUp: {
  514. reviewFlag: false,
  515. saveButton: false,
  516. readonlyFlag: false,
  517. disabled: false
  518. },
  519. factorFlag:false,
  520. KGReported:'',
  521. KGApprove:'',
  522. KGRework:'',
  523. saveHeaderData: {
  524. qtyRequire:'',
  525. qtyUnApprove:'',
  526. site: '',
  527. seqNo: '',
  528. itemNo: '',
  529. partNo: '',
  530. partDescription: '',
  531. operationDesc: '',
  532. workCenterNo: '',
  533. workCenterDesc: '',
  534. operatorId: '',
  535. operatorName: '',
  536. planStartTime: '',
  537. planFinishTime: '',
  538. qtyReported: 0,
  539. qtyApprove: 0,
  540. qtyRework: 0,
  541. operatorId2: '',
  542. operatorIdName2: '',
  543. scrapReason: '',
  544. preparationTime: 0,
  545. manufacturingTime: 0,
  546. cleaningTime: 0,
  547. shutdownReason: '',
  548. remark: '',
  549. orderRef1:'',
  550. scheduleType:'',
  551. userId:'',
  552. },
  553. scanSeqNo:'',
  554. stopModalFlag:false,
  555. continueModalFlag:false,
  556. qty1:'',
  557. qty2:'',
  558. qty3:'',
  559. sopFlag:false,
  560. site: '',
  561. operatorType: 0,
  562. // 导出 start
  563. exportData: [],
  564. exportDataStandard: {
  565. '派工单号': 'seqNo',
  566. '关联单号': 'orderNo',
  567. '关联单号类型': 'scheduleType',
  568. '工序号': 'itemNo',
  569. '工序名称': 'itemDesc',
  570. '派工数量': 'qtyRequired',
  571. '报工数量': 'qtyReported',
  572. '合格数量': 'qtyApprove',
  573. '需求时间': 'timeRequired',
  574. '派工日期': 'sScheduledDate',
  575. '操作员姓名': 'operatorName',
  576. '产品编码': 'partNo',
  577. '产品名称': 'partDesc',
  578. '机台ID': 'sResourceID',
  579. '班次': 'sShiftNo',
  580. '加工中心': 'sWorkCenterNo',
  581. },
  582. exportName: '派工单列表' + this.getStrDate(),
  583. exportHeader: ['派工单列表'],
  584. exportFooter: [],
  585. exportDefaultValue: '这一行这一列没有数据',
  586. // 导出 end
  587. height: 200,
  588. tableData: [],
  589. date1: '',
  590. searchData: {
  591. userId:this.$store.state.user.name,
  592. orderNo: '',
  593. sWorkCenterNo: '',
  594. partNo: '',
  595. site: '',
  596. itemDesc:'',
  597. scheduleType:'',
  598. reportFlag:"closedFlag='N'",
  599. startDate:'',
  600. endDate:'',
  601. operatorName:'',
  602. sResourceID:'',
  603. sShiftNo:'',
  604. },
  605. photoUrl:'',
  606. sopData:{
  607. site:'',
  608. partNo:'',
  609. },
  610. scanModalFlag:false,
  611. partDescription:'',
  612. fileTitle:'',
  613. fileName:'',
  614. num:1,
  615. currentData:'',
  616. photoDatas:[],
  617. uploadImg:[],
  618. showviewer: false,
  619. url: '',
  620. height2:600,
  621. tagNo2:'',
  622. startModalFlag:false,
  623. }
  624. },
  625. mounted () {
  626. this.$nextTick(() => {
  627. this.height = window.innerHeight - 210
  628. this.height2 = window.innerHeight -100
  629. })
  630. },
  631. methods: {
  632. saveReport () {
  633. this.saveHeaderData.qtyReported=Number(this.saveHeaderData.qtyUnApprove)+Number(this.saveHeaderData.qtyApprove);
  634. if (this.saveHeaderData.qtyUnApprove == null || this.saveHeaderData.qtyUnApprove < 0) {
  635. this.$alert('不合格数量错误!', '错误信息', {
  636. confirmButtonText: '确定'
  637. })
  638. return
  639. }
  640. if (this.saveHeaderData.qtyApprove == null || this.saveHeaderData.qtyApprove <= 0) {
  641. this.$alert('合格数量错误!', '错误信息', {
  642. confirmButtonText: '确定'
  643. })
  644. return
  645. }
  646. if (this.saveHeaderData.qtyRework == null || this.saveHeaderData.qtyRework <0) {
  647. this.$alert('返工数量错误!', '错误信息', {
  648. confirmButtonText: '确定'
  649. })
  650. return
  651. }
  652. if (this.saveHeaderData.preparationTime == null || this.saveHeaderData.preparationTime < 0) {
  653. this.$alert('准备时间错误!', '错误信息', {
  654. confirmButtonText: '确定'
  655. })
  656. return
  657. }
  658. if (this.saveHeaderData.manufacturingTime == null || this.saveHeaderData.manufacturingTime < 0) {
  659. this.$alert('制造时间错误!', '错误信息', {
  660. confirmButtonText: '确定'
  661. })
  662. return
  663. }
  664. if (this.saveHeaderData.cleaningTime == null || this.saveHeaderData.cleaningTime < 0) {
  665. this.$alert('清理时间错误!', '错误信息', {
  666. confirmButtonText: '确定'
  667. })
  668. return
  669. }
  670. if (this.saveHeaderData.planStartTime == null || this.saveHeaderData.planStartTime === '') {
  671. this.$alert('请选择生产日期!', '错误信息', {
  672. confirmButtonText: '确定'
  673. })
  674. return
  675. }
  676. if (this.saveHeaderData.planFinishTime == null || this.saveHeaderData.planFinishTime === '') {
  677. this.$alert('请选择报告日期!', '错误信息', {
  678. confirmButtonText: '确定'
  679. })
  680. return
  681. }
  682. saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => {
  683. if (data.code == 0) {
  684. this.$message.success(data.msg)
  685. this.setUp.reviewFlag = false
  686. this.search()
  687. if(data.transData!=null){
  688. let inList=[];
  689. inList.push(data.transData)
  690. printTransNoLabel(inList);
  691. }
  692. } else {
  693. this.$alert(data.msg, '错误', {
  694. confirmButtonText: '确定'
  695. })
  696. }
  697. })
  698. },
  699. // 获取基础数据列表S
  700. getBaseList (val, type) {
  701. this.tagNo = val
  702. this.tagNo2 = type
  703. this.$nextTick(() => {
  704. let strVal = ''
  705. if (val === 24) {
  706. strVal = this.searchData.sWorkCenterNo
  707. }
  708. if (val === 5) {
  709. strVal = this.searchData.partNo
  710. }
  711. if (val === 26) {
  712. if(type==1) {
  713. strVal = this.saveHeaderData.operatorId
  714. }else if(type==2){
  715. strVal = this.saveHeaderData.operatorId2
  716. }else {
  717. strVal = this.searchData.operatorName
  718. }
  719. }
  720. if (val === 88) {
  721. strVal = this.searchData.sResourceID
  722. }
  723. this.$refs.baseList.init(val, strVal)
  724. })
  725. },
  726. /* 列表方法的回调 */
  727. getBaseData (val) {
  728. if (this.tagNo === 24) {
  729. this.searchData.sWorkCenterNo = val.WorkCenterNo
  730. } else if (this.tagNo === 5) {
  731. this.searchData.partNo = val.PartNo
  732. }
  733. if (this.tagNo === 26) {
  734. if(this.tagNo2==1) {
  735. this.saveHeaderData.operatorId = val.OperatorID
  736. this.saveHeaderData.operatorName = val.OperatorName
  737. }else if(this.tagNo2==2){
  738. this.saveHeaderData.operatorId2 = val.OperatorID
  739. this.saveHeaderData.operatorIdName2 = val.OperatorName
  740. }else {
  741. this.searchData.operatorName = val.OperatorName
  742. }
  743. }
  744. if (this.tagNo === 88) {
  745. this.searchData.sResourceID = val.ResourceID
  746. }
  747. },
  748. initReportModal (row) {
  749. this.scanSeqNo=row.seqNo
  750. this.searchSeqNo()
  751. // this.setUp.reviewFlag = true;
  752. // this.setUp.disabled = true;
  753. // let currentData = JSON.parse(JSON.stringify(row));
  754. // this.KGReported=0
  755. // this.KGApprove=0
  756. // this.KGRework=0
  757. // this.saveHeaderData.qtyApprove=0
  758. // this.saveHeaderData.qtyUnApprove=0
  759. // this.saveHeaderData.qtyRework=0
  760. // this.saveHeaderData.site = currentData.site;
  761. // this.saveHeaderData.seqNo = currentData.seqNo;
  762. // this.saveHeaderData.itemNo = currentData.itemNo;
  763. // this.saveHeaderData.operationDesc = currentData.itemDesc;
  764. // this.saveHeaderData.partNo = currentData.partNo;
  765. // this.saveHeaderData.partDescription = currentData.partSpec;
  766. // this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo;
  767. // this.saveHeaderData.workCenterDesc = currentData.workCenterDesc;
  768. // this.saveHeaderData.orderRef1=currentData.orderRef1;
  769. // this.saveHeaderData.orderNo=currentData.orderNo;
  770. // this.saveHeaderData.scheduleType=currentData.scheduleType;
  771. // this.saveHeaderData.operatorId=currentData.operatorId;
  772. // this.saveHeaderData.operatorName=currentData.operatorName;
  773. // this.saveHeaderData.userId=this.$store.state.user.name;
  774. // this.qty1='';
  775. // this.qty2 ='';
  776. // this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
  777. // searchReportedQty(this.saveHeaderData).then(({data}) => {
  778. // this.qty1 = data.row.qtyReported;
  779. // this.qty2 =data.row.lastApproveQty;
  780. // this.saveHeaderData.manufacturingTime=data.row.timeReported;
  781. // if(data.row.weightFactor==-1){
  782. // this.qty3 ="erp未维护数据"
  783. // this.KGReported=''
  784. // this.KGApprove=''
  785. // this.KGRework=''
  786. // this.factorFlag=true;
  787. // }else {
  788. // this.qty3 =data.row.weightFactor
  789. // this.factorFlag=false;
  790. // }
  791. // })
  792. },
  793. closeDialog () {
  794. Object.assign(this.$data.saveHeaderData, this.$options.data.call(this).saveHeaderData)
  795. },
  796. search () {
  797. getSOScheduleRoutingData(this.searchData).then(({data}) => {
  798. this.tableData = data.rows
  799. })
  800. },
  801. createExportData () {
  802. return this.tableData
  803. },
  804. startDownload () {
  805. // this.exportData = this.dataList
  806. },
  807. finishDownload () {
  808. },
  809. getStrDate () {
  810. let dd = new Date()
  811. let Y = dd.getFullYear()
  812. let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0
  813. let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0
  814. let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
  815. let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
  816. let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
  817. return Y + M + D + H + MM + S
  818. },
  819. SOPModal(){
  820. this.sopData.partNo = this.saveHeaderData.partNo;
  821. this.sopData.site= this.saveHeaderData.site;
  822. this.partDescription= this.saveHeaderData.partDescription;
  823. // var div1=document.getElementById("padPhoto");
  824. // div1.style.cssText= "height:"+this.height2+"px;";
  825. this.getPhoto();
  826. this.sopFlag=true;
  827. },
  828. SOPModal2(row){
  829. this.sopData.partNo = row.partNo;
  830. this.sopData.site= row.site;
  831. this.partDescription= row.partDesc;
  832. // var div1=document.getElementById("padPhoto");
  833. // div1.style.cssText= "height:"+this.height2+"px;";
  834. this.getPhoto();
  835. this.sopFlag=true;
  836. },
  837. getPhoto(){
  838. getPhotoAddressData(this.sopData).then(({data}) => {
  839. this.photoDatas = data.rows;
  840. if(this.photoDatas.length==0){
  841. this.fileTitle="文件名 ("+0+"/"+0+")";
  842. this.$alert('该物料没有上传图片!', '错误', {
  843. confirmButtonText: '确定'
  844. })
  845. return false;
  846. }
  847. this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
  848. this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
  849. this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
  850. // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
  851. })
  852. },
  853. nextPicture(){
  854. if(this.photoDatas.length==0){
  855. this.fileTitle="文件名 ("+0+"/"+0+")";
  856. this.$alert('该物料没有上传图片!', '错误', {
  857. confirmButtonText: '确定'
  858. })
  859. return false;
  860. }
  861. if(this.num==this.photoDatas.length){
  862. this.num=1;
  863. }else{
  864. this.num=this.num+1;
  865. }
  866. this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
  867. this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
  868. this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
  869. // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
  870. },
  871. lastPicture(){
  872. if(this.photoDatas.length==0){
  873. this.fileTitle="文件名 ("+0+"/"+0+")";
  874. this.fileName='';
  875. this.photoUrl='';
  876. this.$alert('该物料没有上传图片!', '错误', {
  877. confirmButtonText: '确定'
  878. })
  879. return false;
  880. }
  881. if(this.num==1){
  882. this.num=this.photoDatas.length;
  883. }else{
  884. this.num=this.num-1;
  885. }
  886. this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
  887. this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
  888. this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
  889. // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
  890. },
  891. openScan(){
  892. this.scanSeqNo='';
  893. this.scanModalFlag=true;
  894. this.$nextTick(() => { this.$refs.input.focus();})
  895. },
  896. openStart(){
  897. this.scanSeqNo='';
  898. this.startModalFlag=true;
  899. this.$nextTick(() => { this.$refs.start.focus();})
  900. },
  901. stopScan(){
  902. this.scanSeqNo='';
  903. this.stopModalFlag=true;
  904. this.$nextTick(() => { this.$refs.stop.focus();})
  905. },
  906. continueScan(){
  907. this.scanSeqNo='';
  908. this.continueModalFlag=true;
  909. this.$nextTick(() => { this.$refs.continue.focus();})
  910. },
  911. searchSeqNo(){
  912. if(this.scanSeqNo==''){
  913. this.$alert("请扫描派工单!",'错误', {
  914. confirmButtonText: '确定'
  915. })
  916. return false;
  917. }
  918. let inData={
  919. userId:this.$store.state.user.name,
  920. seqNo:this.scanSeqNo
  921. }
  922. searchSeqNo(inData).then(({data}) => {
  923. if (data.code == 0) {
  924. if(data.row==null){
  925. this.scanSeqNo=''
  926. this.$alert("派工单不存在!",'错误', {
  927. confirmButtonText: '确定'
  928. })
  929. return false;
  930. }
  931. let currentData = data.row;
  932. if(currentData.closedFlag=='Y'){
  933. this.scanSeqNo=''
  934. this.$alert("该派工单已关闭!",'错误', {
  935. confirmButtonText: '确定'
  936. })
  937. return false;
  938. }
  939. this.KGReported=0
  940. this.KGApprove=0
  941. this.KGRework=0
  942. this.saveHeaderData.qtyApprove=0
  943. this.saveHeaderData.qtyUnApprove=0
  944. this.saveHeaderData.qtyRework=0
  945. this.saveHeaderData.site = currentData.site;
  946. this.saveHeaderData.seqNo = currentData.seqNo;
  947. this.saveHeaderData.itemNo = currentData.itemNo;
  948. this.saveHeaderData.operationDesc = currentData.itemDesc;
  949. this.saveHeaderData.partNo = currentData.partNo;
  950. this.saveHeaderData.partDescription = currentData.partSpec;
  951. this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo;
  952. this.saveHeaderData.workCenterDesc = currentData.workCenterDesc;
  953. this.saveHeaderData.orderRef1=currentData.orderRef1;
  954. this.saveHeaderData.orderNo=currentData.orderNo;
  955. this.saveHeaderData.scheduleType=currentData.scheduleType;
  956. this.saveHeaderData.operatorId=currentData.operatorId;
  957. this.saveHeaderData.operatorName=currentData.operatorName;
  958. this.saveHeaderData.qtyRequire=currentData.qtyRequired;
  959. this.saveHeaderData.userId=this.$store.state.user.name;
  960. this.qty1='';
  961. this.qty2 ='';
  962. this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
  963. this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
  964. (this.saveHeaderData).then(({data}) => {
  965. if(data.code===0) {
  966. this.cavity= data.row.cavity
  967. this.qty1 = data.row.qtyReported;
  968. this.qty2 = data.row.lastApproveQty;
  969. this.saveHeaderData.manufacturingTime = data.row.timeReported;
  970. if (data.row.weightFactor == 0) {
  971. this.qty3 = "erp未维护数据"
  972. this.KGReported = ''
  973. this.KGApprove = ''
  974. this.KGRework = ''
  975. this.factorFlag = true;
  976. } else {
  977. this.qty3 = data.row.weightFactor
  978. this.factorFlag = false;
  979. }
  980. }else {
  981. this.$alert(data.msg, '错误', {
  982. confirmButtonText: '确定'
  983. })
  984. return false;
  985. }
  986. })
  987. this.scanModalFlag=false;
  988. this.setUp.reviewFlag = true;
  989. this.setUp.disabled = true;
  990. } else {
  991. this.scanSeqNo=''
  992. this.$alert(data.msg, '错误', {
  993. confirmButtonText: '确定'
  994. })
  995. }
  996. })
  997. },
  998. qtyReportedBlur(){
  999. if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyUnApprove!=''){
  1000. this.KGReported=(this.saveHeaderData.qtyUnApprove*this.qty3).toFixed(1)
  1001. }
  1002. if(this.saveHeaderData.qtyUnApprove==''){
  1003. this.KGReported=''
  1004. }
  1005. },
  1006. qtyApproveBlur(){
  1007. if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyApprove!=''){
  1008. this.KGApprove=(this.saveHeaderData.qtyApprove*this.qty3).toFixed(1)
  1009. this.moQty=''
  1010. }
  1011. if(this.saveHeaderData.qtyApprove==''){
  1012. this.KGApprove=''
  1013. }
  1014. },
  1015. qtyReworkBlur(){
  1016. if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyRework!=''){
  1017. this.KGRework=(this.saveHeaderData.qtyRework*this.qty3).toFixed(1)
  1018. }
  1019. if(this.saveHeaderData.qtyRework==''){
  1020. this.KGRework=''
  1021. }
  1022. },
  1023. KGReportedBlur(){
  1024. if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGReported!=''){
  1025. this.saveHeaderData.qtyUnApprove=(this.KGReported/this.qty3).toFixed(1)
  1026. }
  1027. if(this.KGReported==''){
  1028. this.saveHeaderData.qtyUnApprove=''
  1029. }
  1030. },
  1031. KGApproveBlur(){
  1032. if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGApprove!=''){
  1033. this.saveHeaderData.qtyApprove=(this.KGApprove/this.qty3).toFixed(1)
  1034. this.moQty=''
  1035. }
  1036. if(this.KGApprove==''){
  1037. this.saveHeaderData.qtyApprove=''
  1038. }
  1039. },
  1040. KGReworkBlur(){
  1041. if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGRework!=''){
  1042. this.saveHeaderData.qtyRework=(this.KGRework/this.qty3).toFixed(1)
  1043. }
  1044. if(this.KGRework==''){
  1045. this.saveHeaderData.qtyRework=''
  1046. }
  1047. },
  1048. startSeqNo(){
  1049. let inData={
  1050. username:this.$store.state.user.name,
  1051. seqNo:this.scanSeqNo,
  1052. }
  1053. startSeqNo(inData).then(({data}) => {
  1054. if (data && data.code === 0) {
  1055. this.scanSeqNo='';
  1056. this.startModalFlag=false;
  1057. this.$message({
  1058. message: '操作成功',
  1059. type: 'success',
  1060. duration: 1500,
  1061. onClose: () => {
  1062. }
  1063. })
  1064. } else {
  1065. this.scanSeqNo='';
  1066. this.$alert(data.msg, '错误', {
  1067. confirmButtonText: '确定'
  1068. })
  1069. }
  1070. })
  1071. },
  1072. stopWork(){
  1073. let inData={
  1074. username:this.$store.state.user.name,
  1075. seqNo:this.scanSeqNo
  1076. }
  1077. stopWork(inData).then(({data}) => {
  1078. if (data && data.code === 0) {
  1079. this.scanSeqNo='';
  1080. this.stopModalFlag=false;
  1081. this.$message({
  1082. message: '派工单已暂停',
  1083. type: 'success',
  1084. duration: 1500,
  1085. onClose: () => {
  1086. }
  1087. })
  1088. } else {
  1089. this.scanSeqNo='';
  1090. this.$alert(data.msg, '错误', {
  1091. confirmButtonText: '确定'
  1092. })
  1093. }
  1094. })
  1095. },
  1096. continueWork(){
  1097. let inData={
  1098. username:this.$store.state.user.name,
  1099. seqNo:this.scanSeqNo
  1100. }
  1101. continueWork(inData).then(({data}) => {
  1102. if (data && data.code === 0) {
  1103. this.scanSeqNo='';
  1104. this.continueModalFlag=false;
  1105. this.$message({
  1106. message: '派工单已继续',
  1107. type: 'success',
  1108. duration: 1500,
  1109. onClose: () => {
  1110. }
  1111. })
  1112. } else {
  1113. this.scanSeqNo='';
  1114. this.$alert(data.msg, '错误', {
  1115. confirmButtonText: '确定'
  1116. })
  1117. }
  1118. })
  1119. },
  1120. moQtyBlur(){
  1121. this.saveHeaderData.qtyApprove=Number(this.cavity*this.moQty).toFixed(1);
  1122. this.KGApprove='';
  1123. }
  1124. },
  1125. created () {
  1126. }
  1127. }
  1128. </script>
  1129. <style scoped>
  1130. .input_left{
  1131. text-align: left;
  1132. }
  1133. .input_reight{
  1134. text-align: right;
  1135. }
  1136. /deep/ input::-webkit-inner-spin-button {
  1137. -webkit-appearance: none !important;
  1138. }
  1139. input[type='number'] {
  1140. -moz-appearance: textfield !important;
  1141. }
  1142. </style>