orderHomogeneityInspectDialog.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <div>
  3. <ele-modal
  4. width="80vw"
  5. :visible.sync="visible"
  6. :close-on-click-modal="false"
  7. row-key="code"
  8. custom-class="ele-dialog-form"
  9. :title="'齐套性检查'"
  10. >
  11. <div class="form-wrapper">
  12. <!-- <el-form :model="requestData" label-width="0" :show-message="false">-->
  13. <!-- <el-descriptions title="" :column="2" border>-->
  14. <!-- <el-descriptions-item label="计划编号">-->
  15. <!-- {{ formData.code }}</el-descriptions-item-->
  16. <!-- >-->
  17. <!-- <el-descriptions-item label="产品编码">{{-->
  18. <!-- formData.productCode-->
  19. <!-- }}</el-descriptions-item>-->
  20. <!-- <el-descriptions-item label="产品名称">{{-->
  21. <!-- formData.productName-->
  22. <!-- }}</el-descriptions-item>-->
  23. <!-- <el-descriptions-item label="牌号|型号">-->
  24. <!-- {{ formData.brandNo }}|{{ formData.model }}</el-descriptions-item-->
  25. <!-- >-->
  26. <!-- <el-descriptions-item label="批次号">{{-->
  27. <!-- formData.batchNo-->
  28. <!-- }}</el-descriptions-item>-->
  29. <!-- <el-descriptions-item label="工艺路线">{{-->
  30. <!-- formData.produceRoutingName-->
  31. <!-- }}</el-descriptions-item>-->
  32. <!-- <el-descriptions-item label="要求生产数量">{{-->
  33. <!-- formData.requiredFormingNum-->
  34. <!-- }}</el-descriptions-item>-->
  35. <!-- <el-descriptions-item label="要求完成日期">{{-->
  36. <!-- formData.reqMoldTime-->
  37. <!-- }}</el-descriptions-item>-->
  38. <!-- </el-descriptions>-->
  39. <!-- </el-form>-->
  40. <!-- <headerTitle title="剩余拆批" class="mt20"> </headerTitle>-->
  41. <el-form ref="form" :model="form" :rules="rules">
  42. <!-- <ele-pro-table-->
  43. <!-- ref="table"-->
  44. <!-- :needPage="false"-->
  45. <!-- :columns="columns"-->
  46. <!-- :datasource="form.surplusUnpack"-->
  47. <!-- >-->
  48. <!-- <template v-slot:toolbar>-->
  49. <!-- <el-button-->
  50. <!-- size="small"-->
  51. <!-- type="primary"-->
  52. <!-- icon="el-icon-plus"-->
  53. <!-- class="ele-btn-icon"-->
  54. <!-- :disabled="requiredFormingNum == 0 ? true : false"-->
  55. <!-- @click="openUnpack"-->
  56. <!-- >-->
  57. <!-- 拆批-->
  58. <!-- </el-button>-->
  59. <!-- </template>-->
  60. <!-- <template v-slot:requiredFormingNum="scope">-->
  61. <!-- <el-form-item-->
  62. <!-- v-if="requiredFormingNum != 0"-->
  63. <!-- :prop="'surplusUnpack.' + scope.$index + '.requiredFormingNum'"-->
  64. <!-- :rules="[-->
  65. <!-- {-->
  66. <!-- required: true,-->
  67. <!-- message: '请输入要求生产数量',-->
  68. <!-- trigger: 'change'-->
  69. <!-- },-->
  70. <!-- {-->
  71. <!-- pattern: /^\d+(\.{0,1}\d+){0,1}$/,-->
  72. <!-- message: '拆批数超过生产数量',-->
  73. <!-- trigger: ['blur', 'change']-->
  74. <!-- }-->
  75. <!-- ]"-->
  76. <!-- >-->
  77. <!-- <el-input-->
  78. <!-- disabled-->
  79. <!-- v-model="requiredFormingNum"-->
  80. <!-- placeholder="请输入"-->
  81. <!-- ></el-input>-->
  82. <!-- </el-form-item>-->
  83. <!-- <el-form-item v-else> 工单已全部拆完 </el-form-item>-->
  84. <!-- </template>-->
  85. <!-- <template v-slot:splitResidue="scope">-->
  86. <!-- {{ formData.splitResidue }}-->
  87. <!-- </template>-->
  88. <!-- </ele-pro-table>-->
  89. <!-- <headerTitle title="拆批" class="mt20"> </headerTitle>-->
  90. <ele-pro-table
  91. ref="table"
  92. :needPage="false"
  93. :columns="columns"
  94. :datasource="datasource"
  95. :init-load="false"
  96. >
  97. <template v-slot:stockCount="{ row }">
  98. <el-link type="primary" :underline="false" @click="stockDetail(row)">
  99. {{ row.stockCount }}
  100. </el-link>
  101. </template>
  102. <template v-slot:currentCount="{ row }">
  103. <el-link type="primary" :underline="false" @click="currentDetail(row)">
  104. {{ row.currentCount }}
  105. </el-link>
  106. </template>
  107. <!-- <template v-slot:requiredFormingNum="scope">-->
  108. <!-- <el-form-item-->
  109. <!-- :prop="'unpackList.' + scope.$index + '.requiredFormingNum'"-->
  110. <!-- :rules="{-->
  111. <!-- required: true,-->
  112. <!-- message: '请输入要求生产数量',-->
  113. <!-- trigger: 'change'-->
  114. <!-- }"-->
  115. <!-- >-->
  116. <!-- <el-input-number-->
  117. <!-- type="number"-->
  118. <!-- @change="changeNum(scope.$index)"-->
  119. <!-- :min="0"-->
  120. <!-- v-model="scope.row.requiredFormingNum"-->
  121. <!-- placeholder="请输入"-->
  122. <!-- ></el-input-number>-->
  123. <!-- </el-form-item>-->
  124. <!-- </template>-->
  125. <!-- <template v-slot:reqMoldTime="scope">-->
  126. <!-- <el-form-item-->
  127. <!-- :prop="'unpackList.' + scope.$index + '.reqMoldTime'"-->
  128. <!-- :rules="{-->
  129. <!-- required: true,-->
  130. <!-- message: '请选择开始计划时间',-->
  131. <!-- trigger: 'change'-->
  132. <!-- }"-->
  133. <!-- >-->
  134. <!-- <el-date-picker-->
  135. <!-- class="w100"-->
  136. <!-- v-model="scope.row.reqMoldTime"-->
  137. <!-- type="date"-->
  138. <!-- value-format="yyyy-MM-dd"-->
  139. <!-- ></el-date-picker>-->
  140. <!-- </el-form-item>-->
  141. <!-- </template>-->
  142. </ele-pro-table>
  143. </el-form>
  144. </div>
  145. <div slot="footer">
  146. <el-button plain @click="cancel">取消</el-button>
  147. <el-button type="primary" @click="confirm">确定</el-button>
  148. </div>
  149. </ele-modal>
  150. <stockDetailDialog ref="stockDetailDialog" />
  151. <currentDetailDialog ref="currentDetailDialog" />
  152. </div>
  153. </template>
  154. <script>
  155. import { orderHomogeneityInspect } from '@/api/saleOrder/index.js';
  156. import stockDetailDialog from '../../productionPlan/components/stockDetailDialog.vue';
  157. import currentDetailDialog from '../../productionPlan/components/currentDetailDialog.vue';
  158. import {homogeneityInspect} from "@/api/productionPlan";
  159. export default {
  160. components: {
  161. stockDetailDialog,
  162. currentDetailDialog
  163. },
  164. data() {
  165. return {
  166. visible: false,
  167. formData: {},
  168. requestData: {
  169. deviceCode: '',
  170. deviceName: '',
  171. deviceId: ''
  172. },
  173. requiredFormingNum: 0,
  174. form: {
  175. homogeneityInspect: []
  176. },
  177. rules: {},
  178. columns: [
  179. {
  180. prop: 'opCode',
  181. label: '工序编码',
  182. align: 'center',
  183. minWidth: 100,
  184. showOverflowTooltip: true
  185. },
  186. {
  187. prop: 'opName',
  188. label: '工序名称',
  189. align: 'center',
  190. minWidth: 100
  191. },
  192. {
  193. prop: 'bomCode',
  194. label: '物料编码',
  195. align: 'center',
  196. minWidth: 100,
  197. showOverflowTooltip: true
  198. },
  199. {
  200. prop: 'bomName',
  201. label: '物料名称',
  202. align: 'center',
  203. minWidth: 100
  204. },
  205. {
  206. prop: 'count',
  207. label: '定额数量',
  208. align: 'center',
  209. minWidth: 80
  210. },
  211. {
  212. slot: 'stockCount',
  213. prop: 'stockCount',
  214. label: '库存数量',
  215. align: 'center',
  216. minWidth: 80
  217. },
  218. {
  219. prop: 'stockStatus',
  220. label: '库存状态',
  221. align: 'center',
  222. minWidth: 80
  223. },
  224. {
  225. slot: 'currentCount',
  226. prop: 'currentCount',
  227. label: '在途数量',
  228. align: 'center',
  229. minWidth: 80
  230. },
  231. {
  232. prop: 'currentStatus',
  233. label: '在途状态',
  234. align: 'center',
  235. minWidth: 80
  236. },
  237. {
  238. prop: 'finishStatus',
  239. label: '最终状态',
  240. align: 'center',
  241. minWidth: 80
  242. },
  243. ],
  244. ids: [],
  245. };
  246. },
  247. methods: {
  248. reload(where) {
  249. this.$nextTick(() => {
  250. this.$refs.table.reload({ page: 1, where });
  251. });
  252. },
  253. /* 表格数据源 */
  254. datasource({ page, limit, where }) {
  255. return homogeneityInspect({
  256. pageNum: page,
  257. size: limit,
  258. ...where,
  259. });
  260. },
  261. stockDetail(row) {
  262. this.$refs.stockDetailDialog.open(row);
  263. },
  264. currentDetail(row) {
  265. this.$refs.currentDetailDialog.open(row);
  266. },
  267. open(data) {
  268. this.visible = true;
  269. this.reload(data);
  270. },
  271. cancel() {
  272. this.formData = {};
  273. this.visible = false;
  274. },
  275. confirm() {
  276. this.visible = false;
  277. },
  278. }
  279. };
  280. </script>
  281. <style lang="scss" scoped>
  282. .mt20 {
  283. margin-top: 20px;
  284. }
  285. .el-form-item {
  286. margin-bottom: 0 !important;
  287. }
  288. </style>