create-order.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <template>
  2. <div>
  3. <ele-modal :visible.sync="visible" :title="title" width="80vw" append-to-body>
  4. <el-form
  5. ref="form"
  6. :model="form"
  7. :rules="rules"
  8. label-width="90px"
  9. class="create-form"
  10. >
  11. <el-row :gutter="15">
  12. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  13. <el-form-item label="销售订单号:">
  14. <el-input clearable :maxlength="20" v-model="form.code" disabled />
  15. </el-form-item>
  16. </el-col>
  17. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  18. <el-form-item label="交付要求:">
  19. <DictSelection
  20. dictName="紧急程度"
  21. clearable
  22. v-model="form.deliveryRequirements"
  23. >
  24. </DictSelection>
  25. </el-form-item>
  26. </el-col>
  27. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  28. <el-form-item label="订单类型:">
  29. <el-select
  30. v-model="form.orderType"
  31. placeholder="请选择"
  32. @change="chooseType"
  33. style="width: 100%"
  34. >
  35. <el-option
  36. v-for="item in typeList"
  37. :key="item.id"
  38. :label="item.label"
  39. :value="item.id"
  40. >
  41. </el-option>
  42. </el-select>
  43. </el-form-item>
  44. </el-col>
  45. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  46. <el-form-item label="按单按库:">
  47. <DictSelection
  48. dictName="按单按库"
  49. clearable
  50. v-model="form.orderLibraryType"
  51. >
  52. </DictSelection>
  53. </el-form-item>
  54. </el-col>
  55. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  56. <el-form-item label="客户名称:">
  57. <el-input
  58. clearable
  59. v-model="form.customerName"
  60. :disabled="form.orderType == 3"
  61. />
  62. </el-form-item>
  63. </el-col>
  64. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  65. <el-form-item label="客户简称:">
  66. <el-input
  67. clearable
  68. v-model="form.simpleName"
  69. :disabled="form.orderType == 3"
  70. />
  71. </el-form-item>
  72. </el-col>
  73. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  74. <el-form-item label="客户代号:">
  75. <el-input
  76. clearable
  77. v-model="form.serialNo"
  78. :disabled="form.orderType == 3"
  79. />
  80. </el-form-item>
  81. </el-col>
  82. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  83. <el-form-item label="业务员:">
  84. <el-input clearable v-model="form.salesman" />
  85. </el-form-item>
  86. </el-col>
  87. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  88. <el-form-item label="交付日期:" prop="deliveryTime">
  89. <el-date-picker
  90. :picker-options="pickerOptions"
  91. style="width: 100%"
  92. v-model="form.deliveryTime"
  93. type="date"
  94. placeholder="选择日期"
  95. value-format="yyyy-MM-dd"
  96. >
  97. </el-date-picker>
  98. </el-form-item>
  99. </el-col>
  100. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  101. <el-form-item label="齐套状态:" prop="completeState">
  102. <el-select v-model="form.completeState" style="width: 100%" >
  103. <el-option
  104. v-for="item of completeList"
  105. :key="item.code"
  106. :label="item.name"
  107. :value="item.code"
  108. ></el-option>
  109. </el-select>
  110. </el-form-item>
  111. </el-col>
  112. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
  113. <el-form-item label="备注:">
  114. <el-input clearable v-model="form.notes" />
  115. </el-form-item>
  116. </el-col>
  117. </el-row>
  118. <el-table :data="form.productInfoList" border height="40vh" key="id">
  119. <el-table-column label="序号" align="center" width="60">
  120. <template slot-scope="scope">
  121. <span>{{ scope.$index + 1 }}</span>
  122. </template>
  123. </el-table-column>
  124. <el-table-column label="行号" align="center" prop="lineNumber">
  125. </el-table-column>
  126. <el-table-column label="产品名称" align="center" prop="productName">
  127. </el-table-column>
  128. <el-table-column label="物料编码" align="center" prop="productCode">
  129. </el-table-column>
  130. <el-table-column label="牌号" align="center" prop="brandNo">
  131. </el-table-column>
  132. <el-table-column label="型号" align="center" prop="model">
  133. </el-table-column>
  134. <el-table-column label="规格" align="center" prop="specification">
  135. </el-table-column>
  136. <el-table-column label="单重" align="center" prop="productUnitWeight">
  137. </el-table-column>
  138. <el-table-column label="重量单位" align="center" prop="weightUnit">
  139. </el-table-column>
  140. <el-table-column label="订单数量" width="140" align="center" prop="contractNum">
  141. <template slot-scope="scope">
  142. <el-form-item
  143. label-width="0px"
  144. :prop="'productInfoList.' + scope.$index + '.contractNum'"
  145. :rules="{
  146. required: true,
  147. message: '请输入订单数量',
  148. trigger: 'blur'
  149. }"
  150. >
  151. <el-input
  152. v-model.number="scope.row.contractNum"
  153. size="small"
  154. type="number"
  155. style="width: 100%"
  156. placeholder="输入数量"
  157. @input="inputNumber(scope.row, scope.$index)"
  158. ></el-input>
  159. </el-form-item>
  160. </template>
  161. </el-table-column>
  162. <el-table-column label="加工方式" width="140" align="center" prop="productType">
  163. <template slot-scope="scope">
  164. <el-form-item
  165. label-width="0px"
  166. :prop="'productInfoList.' + scope.$index + '.productType'"
  167. >
  168. <el-select v-model="scope.row.productType" @change="changeProductType(scope.row, scope.$index)" :key="scope.$index" >
  169. <el-option
  170. v-for="item of producedList"
  171. :key="scope.$index + item.code"
  172. :label="item.name"
  173. :value="item.code"
  174. ></el-option>
  175. </el-select>
  176. </el-form-item>
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="BOM版本" width="140" align="center" prop="bomCategoryId" v-if="clientEnvironmentId != 4">
  180. <template slot-scope="scope">
  181. <el-form-item
  182. label-width="0px"
  183. :prop="'productInfoList.' + scope.$index + '.bomCategoryId'"
  184. :key="scope.$index"
  185. >
  186. <el-select v-model="scope.row.bomCategoryId" @change="changeBomId(scope.row, scope.$index)" >
  187. <el-option
  188. v-for="item of scope.row.bomVersionList"
  189. :key="item.id"
  190. :label="item.name + '(V' + item.versions + '.0)'"
  191. :value="item.id"
  192. ></el-option>
  193. </el-select>
  194. </el-form-item>
  195. </template>
  196. </el-table-column>
  197. <el-table-column label="工艺路线" width="140" align="center" prop="produceRoutingId" v-if="clientEnvironmentId != 4">
  198. <template slot-scope="scope">
  199. <el-form-item
  200. label-width="0px"
  201. :prop="'productInfoList.' + scope.$index + '.produceRoutingId'"
  202. >
  203. <el-select v-model="scope.row.produceRoutingId" >
  204. <el-option
  205. v-for="item of scope.row.routingList"
  206. :key="item.id"
  207. :label="item.name"
  208. :value="item.id"
  209. ></el-option>
  210. </el-select>
  211. </el-form-item>
  212. </template>
  213. </el-table-column>
  214. <el-table-column label="工艺路线" align="center" prop="produceRoutingName" v-if="clientEnvironmentId == 4">
  215. <template slot-scope="scope">
  216. <el-form-item
  217. label-width="0px"
  218. :prop="'productInfoList.' + scope.$index + '.produceRoutingName'"
  219. >
  220. <el-input v-model="form.produceRoutingName" style="width: 100%" readonly ></el-input>
  221. </el-form-item>
  222. </template>
  223. </el-table-column>
  224. <el-table-column label="计量单位" align="center" prop="measuringUnit">
  225. </el-table-column>
  226. <el-table-column
  227. label="模数"
  228. align="center"
  229. width="100"
  230. v-if="clientEnvironmentId == '4'"
  231. >
  232. <template slot-scope="scope">
  233. <div>
  234. <el-input
  235. style="width: 100%"
  236. size="small"
  237. v-model="scope.row.moCount"
  238. oninput="value=value.replace(/[^0-9.]/g,'')"
  239. @input="
  240. tableHandleKeyUp(scope.row, scope.$index, $event, 'moCount')
  241. "
  242. placeholder="请输入"
  243. >
  244. </el-input>
  245. </div>
  246. </template>
  247. </el-table-column>
  248. <el-table-column
  249. align="center"
  250. width="100"
  251. label="块数"
  252. v-if="clientEnvironmentId == '4'"
  253. >
  254. <template slot-scope="scope">
  255. <div>
  256. <el-input
  257. size="small"
  258. style="width: 100%"
  259. @input="
  260. tableHandleKeyUp(
  261. scope.row,
  262. scope.$index,
  263. $event,
  264. 'blockCount'
  265. )
  266. "
  267. v-model="scope.row.blockCount"
  268. placeholder="请输入"
  269. ></el-input>
  270. </div>
  271. </template>
  272. </el-table-column>
  273. <el-table-column label="订单重量" align="center" prop="productWeight">
  274. <template slot-scope="{ row }">
  275. <span>{{ row.productWeight ? row.productWeight : '-' }}</span>
  276. </template>
  277. </el-table-column>
  278. <el-table-column label="操作" align="center" width="70">
  279. <template slot-scope="scope">
  280. <el-link
  281. type="primary"
  282. :underline="false"
  283. @click="homogeneityInspect(scope.row)"
  284. >
  285. 齐套性检查
  286. </el-link>
  287. <el-button
  288. type="text"
  289. @click="handleDeleteItem(scope.$index)"
  290. v-if="!scope.row.id"
  291. >删除</el-button
  292. >
  293. </template>
  294. </el-table-column>
  295. </el-table>
  296. <div class="add-product" @click="addEquipment">
  297. <i class="el-icon-circle-plus-outline"></i>
  298. </div>
  299. </el-form>
  300. <template v-slot:footer>
  301. <el-button @click="cancel">取消</el-button>
  302. <el-button type="primary" @click="save" :loading="loading">
  303. 确定
  304. </el-button>
  305. </template>
  306. <!-- 选择产品 -->
  307. <EquipmentDialog
  308. ref="equipmentRefs"
  309. @choose="confirmChoose"
  310. :selectList="
  311. form.productInfoList.filter(
  312. (i) => !disabledList.find((p) => p.productCode === i.productCode)
  313. )
  314. "
  315. >
  316. </EquipmentDialog>
  317. </ele-modal>
  318. <orderHomogeneityInspectDialog ref="orderHomogeneityInspectDialog"></orderHomogeneityInspectDialog>
  319. </div>
  320. </template>
  321. <script>
  322. import { getCode } from '@/api/codeManagement';
  323. import EquipmentDialog from '../components/EquipmentDialog.vue';
  324. import orderHomogeneityInspectDialog from "./orderHomogeneityInspectDialog";
  325. import { createOrUpdate, getOrderDetail , bomListByPlan, bomRoutingList} from '@/api/saleOrder';
  326. import dayjs from 'dayjs';
  327. import { multiply } from '@/utils/math';
  328. export default {
  329. components: {
  330. EquipmentDialog,
  331. orderHomogeneityInspectDialog
  332. },
  333. data() {
  334. return {
  335. visible: false,
  336. loading: false,
  337. disabledList: [], //已保存数据不做删除
  338. form: {
  339. productInfoList: [],
  340. deliveryRequirements: 1,
  341. orderType: 1,
  342. orderLibraryType: 2,
  343. productType: 2,
  344. bomCategoryId: '',
  345. produceRoutingId: '',
  346. deliveryTime: dayjs(
  347. new Date().getTime() + 3600 * 1000 * 24 * 10
  348. ).format('YYYY-MM-DD')
  349. },
  350. // 表单验证规则
  351. rules: {
  352. deliveryTime: [
  353. { required: true, message: '请选择交付日期', trigger: 'change' }
  354. ]
  355. },
  356. typeList: [
  357. { id: 1, label: '内销订单' },
  358. { id: 2, label: '外销订单' },
  359. { id: 3, label: '预制订单' }
  360. ],
  361. producedList: [
  362. { code: 2, name: '加工(MBOM)' },
  363. { code: 3, name: '装配(ABOM)' }
  364. ],
  365. completeList: [
  366. { code: 1, name: '齐套' },
  367. { code: 2, name: '缺料' }
  368. ],
  369. routingList: [],
  370. title: '创建订单',
  371. pickerOptions: {
  372. disabledDate: (time) => {
  373. // 禁用日期
  374. let nowData = new Date();
  375. nowData = new Date(nowData.setDate(nowData.getDate() - 1));
  376. return time < nowData;
  377. }
  378. }
  379. };
  380. },
  381. watch: {
  382. disabledList() {
  383. console.log(this.disabledList, 'disabledList');
  384. }
  385. },
  386. computed: {
  387. // 是否开启响应式布局
  388. styleResponsive() {
  389. return this.$store.state.theme.styleResponsive;
  390. },
  391. clientEnvironmentId() {
  392. return this.$store.state.user.info.clientEnvironmentId;
  393. }
  394. },
  395. created() {},
  396. methods: {
  397. open(row) {
  398. this.visible = true;
  399. if (row) {
  400. this.title = '修改订单';
  401. this.getDetail(row.code);
  402. } else {
  403. this.title = '创建订单';
  404. this.getSaleCode();
  405. }
  406. },
  407. getDetail(code) {
  408. getOrderDetail(code).then((res) => {
  409. if(res.productInfoList){
  410. for(let item of res.productInfoList){
  411. if(item.productType){
  412. item.productType = parseInt(item.productType);
  413. }
  414. }
  415. }
  416. this.disabledList = res.productInfoList;
  417. this.form = res;
  418. });
  419. },
  420. cancel() {
  421. this.form = {
  422. productInfoList: [],
  423. deliveryRequirements: 1,
  424. orderType: 1,
  425. orderLibraryType: 2,
  426. deliveryTime: dayjs(
  427. new Date().getTime() + 3600 * 1000 * 24 * 10
  428. ).format('YYYY-MM-DD')
  429. };
  430. this.$refs.form.clearValidate();
  431. this.visible = false;
  432. },
  433. // 表格:模数、数量(方)、块数输入框 输入事件
  434. tableHandleKeyUp(row, index, e, name) {
  435. let modelArr = row.specification.split('*');
  436. let modelLong = modelArr[0]; // model规格长度
  437. let modeWide = modelArr[1]; // model规格宽度
  438. let modeHight = modelArr[2].substr(0, modelArr[2].indexOf('cm')); // model规格高度
  439. modeHight = Number(modeHight);
  440. if (name === 'moCount') {
  441. // 模数
  442. row.moCount = e;
  443. // 计算块数的公式:
  444. // (一模6米长度 / model规格长度) * (一模1.2米宽度 / model规格宽度) = 每一模的块数
  445. // 每一模的块数*模数moCount = 总块数
  446. if (row.productName.includes('板材')) {
  447. row.blockCount =
  448. Math.floor(600 / modelLong) *
  449. Math.floor(120 / modeHight) *
  450. Math.floor(60 / modeWide) *
  451. row.moCount;
  452. } else if (row.productName.includes('砌块')) {
  453. let modelLongFixed = (600 / modelLong).toFixed(2);
  454. modelLongFixed = modelLongFixed.substring(
  455. 0,
  456. modelLongFixed.length - 1
  457. );
  458. let modeWideFixed = (120 / modeWide).toFixed(2);
  459. modeWideFixed = modeWideFixed.substring(0, modeWideFixed.length - 1);
  460. let modeHightFixed = (60 / modeHight).toFixed(2);
  461. modeHightFixed = modeHightFixed.substring(
  462. 0,
  463. modeHightFixed.length - 1
  464. );
  465. row.blockCount =
  466. Math.floor(modelLongFixed * modeWideFixed * modeHightFixed) *
  467. row.moCount;
  468. }
  469. row.contractNum =
  470. ((modelLong * modeWide * modeHight) / 1000000).toFixed(5) *
  471. row.blockCount;
  472. } else if (name === 'sum') {
  473. //方数
  474. row.contractNum = e;
  475. row.blockCount = Math.floor(
  476. e / ((modelLong * modeWide * modeHight) / 1000000)
  477. );
  478. if (row.productName.includes('板材')) {
  479. row.moCount = Math.ceil(
  480. row.blockCount /
  481. (Math.floor(600 / modelLong) *
  482. Math.floor(120 / modeHight) *
  483. Math.floor(60 / modeWide))
  484. );
  485. } else if (row.productName.includes('砌块')) {
  486. row.moCount = Math.ceil(
  487. row.blockCount /
  488. Math.floor(
  489. (600 / modelLong) * (120 / modeHight) * (60 / modeWide)
  490. )
  491. );
  492. }
  493. } else if (name === 'blockCount') {
  494. //块数
  495. row.blockCount = e;
  496. if (row.productName.includes('板材')) {
  497. row.moCount = Math.ceil(
  498. row.blockCount /
  499. (Math.floor(600 / modelLong) *
  500. Math.floor(120 / modeHight) *
  501. Math.floor(60 / modeWide))
  502. );
  503. } else if (row.productName.includes('砌块')) {
  504. row.moCount = Math.ceil(
  505. row.blockCount /
  506. Math.floor(
  507. (600 / modelLong) * (120 / modeHight) * (60 / modeWide)
  508. )
  509. );
  510. }
  511. row.contractNum =
  512. (Number(e) * modelLong * modeWide * modeHight) / 1000000;
  513. }
  514. row.contractNum = Number(row.contractNum.toFixed(5))
  515. },
  516. // 删除产品
  517. handleDeleteItem(index) {
  518. this.form.productInfoList.splice(index, 1);
  519. this.changeLineNumber();
  520. },
  521. addEquipment() {
  522. this.$refs.equipmentRefs.open();
  523. },
  524. /* 保存编辑 */
  525. save() {
  526. this.$refs.form.validate((valid) => {
  527. if (!valid) {
  528. return false;
  529. }
  530. if (!this.form.productInfoList.length) {
  531. return this.$message.warning('产品列表不能为空!');
  532. }
  533. this.loading = true;
  534. createOrUpdate(this.form)
  535. .then((res) => {
  536. this.loading = false;
  537. this.$message.success('成功');
  538. this.cancel();
  539. this.$emit('refresh');
  540. })
  541. .catch((e) => {
  542. this.loading = false;
  543. });
  544. });
  545. },
  546. // 选择订单类型
  547. chooseType(val) {
  548. if (val == 2) {
  549. this.$set(this.form, 'orderLibraryType', 1);
  550. } else {
  551. this.$set(this.form, 'orderLibraryType', 2);
  552. }
  553. this.$set(this.form, 'customerName', '');
  554. },
  555. async getSaleCode() {
  556. const res = await getCode('sale_order');
  557. if (res) {
  558. this.$set(this.form, 'code', res);
  559. }
  560. },
  561. // 确定选择
  562. confirmChoose(list) {
  563. list = list
  564. .filter(
  565. (i) =>
  566. !this.disabledList.find(
  567. (p) => p.productCode == i.code || p.productCode == i.productCode
  568. )
  569. )
  570. .map((item, index) => {
  571. if (item.productCode) {
  572. return item;
  573. } else {
  574. return {
  575. categoryId: item.id,
  576. productCode: item.code,
  577. productName: item.name,
  578. productUnitWeight: item.netWeight,
  579. weightUnit: item.weightUnit,
  580. model: item.modelType,
  581. specification: item.specification,
  582. brandNo: item.brandNum,
  583. measuringUnit:item.measuringUnit
  584. };
  585. }
  586. })
  587. .concat(this.disabledList);
  588. console.log('list', list);
  589. // 取出在弹窗中选中并且不在表格中的数据
  590. const result = list.filter(
  591. (i) =>
  592. this.form.productInfoList.findIndex(
  593. (p) => p.productCode === i.productCode
  594. ) === -1
  595. );
  596. console.log('result', result);
  597. // 取出在表格中并且不在弹窗中选中的数据 即取消选中的数据
  598. const del = this.form.productInfoList.filter(
  599. (i) => list.findIndex((p) => p.productCode === i.productCode) === -1
  600. );
  601. console.log('del', del);
  602. for (let i = this.form.productInfoList.length - 1; i >= 0; i--) {
  603. for (let j in del) {
  604. console.log(
  605. this.form.productInfoList[i].productCode,
  606. del[j].productCode
  607. );
  608. if (this.form.productInfoList[i].productCode === del[j].productCode) {
  609. this.form.productInfoList.splice(i, 1);
  610. break;
  611. }
  612. }
  613. }
  614. this.form.productInfoList = this.form.productInfoList.concat(result);
  615. this.changeLineNumber();
  616. },
  617. changeLineNumber() {
  618. this.form.productInfoList.map((item, index) => {
  619. item.lineNumber = 10 * (index + 1);
  620. });
  621. },
  622. inputNumber(row, index) {
  623. const pos = this.form.productInfoList;
  624. if (pos[index].productUnitWeight) {
  625. const number = multiply(row.contractNum, row.productUnitWeight);
  626. this.$set(pos[index], 'productWeight', number);
  627. }
  628. if(this.clientEnvironmentId==4){
  629. this.tableHandleKeyUp(row, '', row.contractNum, 'sum');
  630. }
  631. },
  632. changeProductType(row, index) {
  633. let param = {
  634. bomType: row.productType,
  635. categoryId: row.categoryId
  636. }
  637. bomListByPlan(param).then(res => {
  638. let arr = res || [];
  639. if(arr.length == 0){
  640. row.bomCategoryId = '';
  641. }
  642. this.$set(this.form.productInfoList[index], 'bomVersionList', arr);
  643. this.$forceUpdate()
  644. })
  645. },
  646. changeBomId(row, index) {
  647. bomRoutingList(row.bomCategoryId).then((res) => {
  648. let arr = res || [];
  649. if(arr.length == 0){
  650. row.produceRoutingId = '';
  651. }
  652. this.$set(this.form.productInfoList[index], 'routingList', arr);
  653. this.$forceUpdate()
  654. })
  655. },
  656. homogeneityInspect(row){
  657. if(!row.productType){
  658. this.$message.warning('请选择加工方式');
  659. return;
  660. }
  661. if(!row.bomCategoryId){
  662. this.$message.warning('请选择BOM版本');
  663. return;
  664. }
  665. let data = [];
  666. data.push({bomId: row.bomCategoryId, planNum: row.contractNum});
  667. this.$refs.orderHomogeneityInspectDialog.open(data);
  668. },
  669. }
  670. };
  671. </script>
  672. <style lang="scss" scoped>
  673. .basic-details-title {
  674. margin: 10px 0;
  675. }
  676. .add-product {
  677. width: 100%;
  678. display: flex;
  679. align-items: center;
  680. justify-content: flex-end;
  681. font-size: 30px;
  682. color: #1890ff;
  683. margin: 10px 0;
  684. cursor: pointer;
  685. }
  686. .create-form .el-form-item {
  687. margin-bottom: 15px !important;
  688. }
  689. </style>