workingProcedure.vue 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. :visible.sync="visible"
  6. :title="title"
  7. append-to-body
  8. :close-on-click-modal="false"
  9. width="85%"
  10. :maxable="true"
  11. >
  12. <el-card shadow="never">
  13. <header-title title="物品信息"></header-title>
  14. <el-form
  15. label-width="100px"
  16. ref="form"
  17. :model="rowData"
  18. class="item-height"
  19. >
  20. <el-row>
  21. <el-col :span="6" label-width="100px">
  22. <el-form-item label="名称" prop="name">
  23. <el-input
  24. disabled
  25. placeholder="物品名称"
  26. v-model="treeData.name"
  27. ></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="6" label-width="100px">
  31. <el-form-item label="编码" prop="categoryCode">
  32. <el-input
  33. disabled
  34. placeholder="物品编码"
  35. v-model="treeData.categoryCode"
  36. ></el-input>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="6" label-width="100px">
  40. <el-form-item label="型号" prop="modelType">
  41. <el-input
  42. disabled
  43. placeholder="物品型号"
  44. v-model="treeData.modelType"
  45. ></el-input>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="6" label-width="100px">
  49. <el-form-item label="规格" prop="specification">
  50. <el-input
  51. disabled
  52. placeholder="物品规格"
  53. v-model="treeData.specification"
  54. ></el-input>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="6" label-width="100px">
  58. <el-form-item label="bom编码" prop="code">
  59. <el-input
  60. disabled
  61. placeholder="物品规格"
  62. v-model="treeData.code"
  63. ></el-input>
  64. </el-form-item>
  65. </el-col>
  66. </el-row>
  67. </el-form>
  68. <header-title title="工序信息"></header-title>
  69. <el-form label-width="100px" ref="form" :model="rowData">
  70. <el-row>
  71. <el-col :span="6" label-width="100px">
  72. <el-form-item label="编码" prop="type">
  73. <el-input
  74. disabled
  75. placeholder="工序编码"
  76. v-model="rowData.code"
  77. ></el-input>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="6" label-width="100px">
  81. <el-form-item label="工序名称" prop="type">
  82. <el-input
  83. disabled
  84. placeholder="工序名称"
  85. v-model="rowData.name"
  86. ></el-input>
  87. </el-form-item>
  88. </el-col>
  89. <!-- <el-col :span="6" label-width="100px">
  90. <el-form-item label="名称" prop="type">
  91. <el-input
  92. disabled
  93. placeholder="物品名称"
  94. v-model="rowData.name"
  95. ></el-input>
  96. </el-form-item>
  97. </el-col>
  98. <el-col :span="6" label-width="100px">
  99. <el-form-item label="物品编码" prop="type">
  100. <el-input
  101. disabled
  102. placeholder="工序名称"
  103. v-model="rowData.name"
  104. ></el-input>
  105. </el-form-item>
  106. </el-col> -->
  107. </el-row>
  108. </el-form>
  109. <el-tabs
  110. v-model="activeName"
  111. class="tab-box"
  112. type="border-card"
  113. @tab-click="tabsChange"
  114. >
  115. <el-tab-pane label="工艺参数" name="工艺参数">
  116. <ele-pro-table
  117. ref="table"
  118. :datasource="datasource"
  119. :immediate="true"
  120. :need-page="false"
  121. :columns="columns"
  122. >
  123. <!-- 表头工具栏 -->
  124. <template v-if="!isView" v-slot:toolbar>
  125. <el-button
  126. size="small"
  127. icon="el-icon-plus"
  128. class="ele-btn-icon"
  129. type="primary"
  130. @click.native="openParam('工艺')"
  131. >添加参数</el-button
  132. >
  133. </template>
  134. <template v-slot:sort="{ row }">
  135. <div v-if="isView">{{ row.sort }}</div>
  136. <el-input v-else v-model="row.sort"></el-input>
  137. </template>
  138. <!-- 默认值 -->
  139. <template v-slot:defaultValue="{ row }">
  140. <div v-if="isView">
  141. {{ row.defaultValue }}
  142. </div>
  143. <div v-else>
  144. <el-input
  145. v-if="
  146. row.textType == 1 ||
  147. row.textType == 4 ||
  148. row.textType == 3 ||
  149. row.textType == 5
  150. "
  151. v-model="row.defaultValue"
  152. placeholder="请输入"
  153. ></el-input>
  154. <el-select
  155. v-if="row.textType == 2"
  156. v-model="row.defaultValue"
  157. placeholder="请选择"
  158. >
  159. <el-option label="TRUE" :value="'TRUE'" />
  160. <el-option label="FALSE" :value="'FALSE'" />
  161. </el-select>
  162. </div>
  163. </template>
  164. <!-- 上限 -->
  165. <template v-slot:maxValue="{ row }">
  166. <div v-if="isView">
  167. {{ row.maxValue }}
  168. </div>
  169. <div v-else>
  170. <el-input
  171. v-if="row.textType == 3"
  172. v-model="row.maxValue"
  173. placeholder="请输入"
  174. ></el-input>
  175. </div>
  176. </template>
  177. <!-- 下限 -->
  178. <template v-slot:minValue="{ row }">
  179. <div v-if="isView">
  180. {{ row.minValue }}
  181. </div>
  182. <div v-else>
  183. <el-input
  184. v-if="row.textType == 3"
  185. v-model="row.minValue"
  186. placeholder="请输入"
  187. ></el-input>
  188. </div>
  189. </template>
  190. <!-- 单位 -->
  191. <template v-slot:unitName="{ row }">
  192. <div v-if="isView">
  193. {{ row.unitName }}
  194. </div>
  195. <div v-else>
  196. <DictSelection
  197. v-if="row.textType != 2 && row.textType != 5"
  198. dictName="工艺参数单位"
  199. clearable
  200. filterable
  201. v-model="row.unitName"
  202. >
  203. </DictSelection>
  204. <span v-if="row.textType == 5"> h(小时)</span>
  205. </div>
  206. </template>
  207. <!-- 操作列 -->
  208. <template v-slot:action="{ row }">
  209. <el-popconfirm
  210. class="ele-action"
  211. title="确定要删除当前参数吗?"
  212. @confirm="remove(row, '工艺')"
  213. >
  214. <template v-slot:reference>
  215. <el-link
  216. type="danger"
  217. :underline="false"
  218. icon="el-icon-delete"
  219. >
  220. 删除
  221. </el-link>
  222. </template>
  223. </el-popconfirm>
  224. </template>
  225. </ele-pro-table>
  226. </el-tab-pane>
  227. <el-tab-pane label="质检项参数" name="质检项参数">
  228. <term
  229. :qualityParam="qualityParam"
  230. :isView="isView"
  231. :isQualityInspection="false"
  232. ref="qualityParamRef"
  233. ></term>
  234. </el-tab-pane>
  235. <el-tab-pane label="生产节拍" name="生产节拍">
  236. <el-form
  237. label-width="140px"
  238. ref="form"
  239. :model="beatParam"
  240. style="width: 800px; margin: auto"
  241. >
  242. <el-row>
  243. <el-col :span="16" label-width="100px">
  244. <el-form-item label="节拍生产数量" prop="beatNum">
  245. <el-input
  246. v-if="!isView"
  247. placeholder=""
  248. v-model="beatParam.beatNum"
  249. maxlength="9"
  250. ></el-input>
  251. <div v-else>{{ beatParam.beatNum }}</div>
  252. </el-form-item>
  253. </el-col>
  254. <el-col :span="8" label-width="100px">
  255. <el-form-item label="单位:" prop="unit">
  256. <el-select
  257. v-if="!isView"
  258. v-model="beatParam.unit"
  259. filterable
  260. class="ele-block"
  261. @change="changeUnit"
  262. >
  263. <el-option
  264. v-for="item in dictList"
  265. :key="item.value"
  266. :value="item.value"
  267. :label="item.label"
  268. ></el-option>
  269. </el-select>
  270. <div v-else>{{ beatParam.unit }}</div>
  271. </el-form-item>
  272. </el-col>
  273. </el-row>
  274. <el-row>
  275. <el-col :span="16" label-width="100px">
  276. <el-form-item label="生产时长" prop="newBeatTime">
  277. <el-input
  278. v-if="!isView"
  279. placeholder=""
  280. v-model="beatParam.newBeatTime"
  281. @blur="convertVal(beatParam.newBeatTime, 'beatTime')"
  282. maxlength="9"
  283. oninput="value = value.replace(/[^\d.]/g, '')"
  284. ></el-input>
  285. <div v-else>{{ beatParam.newBeatTime }}</div>
  286. </el-form-item>
  287. </el-col>
  288. <el-col :span="8" label-width="100px">
  289. <el-form-item label="单位:" prop="">
  290. <div>{{ beatParam.unit }}</div>
  291. </el-form-item>
  292. </el-col>
  293. </el-row>
  294. <el-row>
  295. <el-col :span="16" label-width="100px">
  296. <el-form-item label="准备时长" prop="newBeatPrepareTime">
  297. <el-input
  298. v-if="!isView"
  299. placeholder=""
  300. v-model="beatParam.newBeatPrepareTime"
  301. @blur="
  302. convertVal(
  303. beatParam.newBeatPrepareTime,
  304. 'beatPrepareTime'
  305. )
  306. "
  307. maxlength="9"
  308. oninput="value = value.replace(/[^\d.]/g, '')"
  309. ></el-input>
  310. <div v-else>{{ beatParam.newBeatPrepareTime }}</div>
  311. </el-form-item>
  312. </el-col>
  313. <el-col :span="8" label-width="100px">
  314. <el-form-item label="单位:" prop="">
  315. <div>{{ beatParam.unit }}</div>
  316. </el-form-item>
  317. </el-col>
  318. </el-row>
  319. <el-row>
  320. <el-col :span="16" label-width="140px">
  321. <el-form-item label="下道工序间隔时长" prop="newBeatRestTime">
  322. <el-input
  323. v-if="!isView"
  324. placeholder=""
  325. v-model="beatParam.newBeatRestTime"
  326. @blur="
  327. convertVal(beatParam.newBeatRestTime, 'beatRestTime')
  328. "
  329. maxlength="9"
  330. oninput="value = value.replace(/[^\d.]/g, '')"
  331. ></el-input>
  332. <div v-else>{{ beatParam.newBeatRestTime }}</div>
  333. </el-form-item>
  334. </el-col>
  335. <el-col :span="8" label-width="100px">
  336. <el-form-item label="单位:" prop="beatRestUnit">
  337. <div>{{ beatParam.unit }}</div>
  338. </el-form-item>
  339. </el-col>
  340. </el-row>
  341. <el-row>
  342. <el-col :span="16" label-width="100px">
  343. <el-form-item label="标准时长" prop="newTime">
  344. <el-input
  345. v-if="!isView"
  346. placeholder="标准时长"
  347. v-model="beatParam.newTime"
  348. @blur="convertVal(beatParam.newTime, 'time')"
  349. maxlength="9"
  350. oninput="value = value.replace(/[^\d.]/g, '')"
  351. ></el-input>
  352. <div v-else>{{ beatParam.newTime }}</div>
  353. </el-form-item>
  354. </el-col>
  355. <el-col :span="8" label-width="100px">
  356. <el-form-item label="单位:" prop="">
  357. <div>{{ beatParam.unit }}</div>
  358. </el-form-item>
  359. </el-col>
  360. </el-row>
  361. <el-row>
  362. <el-col :span="16" label-width="100px">
  363. <el-form-item label="工时单价" prop="taskPrice">
  364. <el-input
  365. v-if="!isView"
  366. placeholder=""
  367. v-model="beatParam.taskPrice"
  368. oninput="value = value.replace(/[^\d.]/g, '')"
  369. maxlength="7"
  370. ></el-input>
  371. <div v-else>{{ beatParam.taskPrice }}</div>
  372. </el-form-item>
  373. </el-col>
  374. <el-col :span="8" label-width="100px">
  375. <el-form-item label="单位:" prop="">
  376. <div>元</div>
  377. </el-form-item>
  378. </el-col>
  379. </el-row>
  380. <el-row>
  381. <el-col :span="24" label-width="100px">
  382. <el-form-item label="备注" prop="remark">
  383. <el-input
  384. v-if="!isView"
  385. placeholder=""
  386. v-model="beatParam.remark"
  387. type="textarea"
  388. :rows="4"
  389. ></el-input>
  390. <div v-else>{{ beatParam.remark }}</div>
  391. </el-form-item>
  392. </el-col>
  393. </el-row>
  394. </el-form>
  395. </el-tab-pane>
  396. <el-tab-pane label="材料定额" name="材料定额">
  397. <ele-pro-table
  398. ref="materialTable"
  399. :columns="columns1"
  400. :datasource="datasource"
  401. :need-page="false"
  402. :immediate="true"
  403. >
  404. <!-- 表头工具栏 -->
  405. <template v-slot:toolbar>
  406. <el-button
  407. type="primary"
  408. v-if="
  409. !isView &&
  410. attributeData.approvalStatus != 1 &&
  411. attributeData.approvalStatus != 2
  412. "
  413. @click="add"
  414. >添加</el-button
  415. >
  416. <el-button
  417. type="primary"
  418. v-if="
  419. !isView &&
  420. attributeData.approvalStatus != 1 &&
  421. attributeData.approvalStatus != 2
  422. "
  423. @click="detailsList"
  424. >从明细表导入</el-button
  425. >
  426. <div class="toolbar_box">
  427. <div>
  428. <el-form
  429. ref="form"
  430. :rules="rules"
  431. :model="form"
  432. label-width="80px"
  433. inline
  434. >
  435. <el-form-item prop="baseCount" label="基本数量">
  436. <el-input
  437. placeholder="请输入"
  438. disabled
  439. v-model.number="form.baseCount"
  440. >
  441. </el-input>
  442. </el-form-item>
  443. <el-form-item prop="baseCountUnit" label="单位">
  444. <!-- <DictSelection
  445. dictName="计量单位"
  446. clearable
  447. :disabled="true"
  448. v-model="form.baseCountUnit"
  449. ></DictSelection> -->
  450. <!-- <el-form-item label="单位:" prop="unit"> -->
  451. <el-select
  452. disabled
  453. v-model="form.baseCountUnit"
  454. filterable
  455. class="ele-block"
  456. @change="changeUnit"
  457. >
  458. <el-option
  459. v-for="item in unitList"
  460. :key="item.value"
  461. :value="item.value"
  462. :label="item.label"
  463. ></el-option>
  464. </el-select>
  465. <!-- </el-form-item> -->
  466. </el-form-item>
  467. </el-form>
  468. </div>
  469. </div>
  470. </template>
  471. <template
  472. v-if="
  473. attributeData.approvalStatus != 1 &&
  474. attributeData.approvalStatus != 2
  475. "
  476. v-slot:action="{ row, $index }"
  477. >
  478. <el-link type="danger" @click="handleDel(row, $index)"
  479. >删除</el-link
  480. >
  481. <el-link type="primary" @click="handSubstitution(row)"
  482. >替代料</el-link
  483. >
  484. </template>
  485. <template v-slot:subCode="{ row }">
  486. <div v-if="isView">{{ row.subCode }}</div>
  487. <el-input
  488. v-else
  489. v-model="row.subCode"
  490. placeholder="请输入"
  491. :disabled="
  492. attributeData.approvalStatus == 1 ||
  493. attributeData.approvalStatus == 2
  494. "
  495. ></el-input>
  496. </template>
  497. <template v-slot:isReworkBom="{ row }">
  498. <div v-if="isView">{{ isReworkBom[row.isReworkBom] }}</div>
  499. <div v-else>
  500. <el-select
  501. v-model="row.isReworkBom"
  502. :disabled="
  503. attributeData.approvalStatus == 1 ||
  504. attributeData.approvalStatus == 2
  505. "
  506. >
  507. <el-option
  508. v-for="item in isReworkBomList"
  509. :key="item.value"
  510. :label="item.label"
  511. :value="item.value"
  512. >
  513. </el-option>
  514. </el-select>
  515. </div>
  516. </template>
  517. <template v-slot:unit="{ row }">
  518. <div v-if="isView">{{ row.unit }}</div>
  519. <div v-else>
  520. <DictSelection
  521. dictName="计量单位"
  522. :isProhibit="true"
  523. v-model="row.unit"
  524. ></DictSelection>
  525. </div>
  526. </template>
  527. <template v-slot:count="{ row }">
  528. <div v-if="isView">{{ row.count }}</div>
  529. <el-input
  530. v-else
  531. v-model="row.count"
  532. placeholder="请输入"
  533. style="width: 90px"
  534. @input="handleInput(row)"
  535. :disabled="
  536. attributeData.approvalStatus == 1 ||
  537. attributeData.approvalStatus == 2
  538. "
  539. ></el-input>
  540. </template>
  541. <template v-slot:categoryName="{ row, $index }">
  542. <el-link
  543. type="primary"
  544. :underline="false"
  545. @click="handSubstitution(row)"
  546. v-if="
  547. isView ||
  548. attributeData.approvalStatus == 1 ||
  549. attributeData.approvalStatus == 2
  550. "
  551. >{{ row.categoryName }}</el-link
  552. >
  553. <div v-else
  554. ><el-input
  555. :value="row.categoryName"
  556. placeholder="请选择"
  557. @click.native="categorySelect(row, $index)"
  558. ></el-input
  559. ></div>
  560. </template>
  561. <template v-slot:bomArtFiles="{ row }">
  562. <fileMain
  563. v-model="row.bomArtFiles"
  564. :type="
  565. isView ||
  566. attributeData.approvalStatus == 1 ||
  567. attributeData.approvalStatus == 2
  568. ? 'view'
  569. : 'add'
  570. "
  571. size="mini"
  572. />
  573. </template>
  574. <template v-slot:remark="{ row }">
  575. <div v-if="isView">{{ row.remark }}</div>
  576. <el-input
  577. v-else
  578. v-model="row.remark"
  579. placeholder="请输入"
  580. :disabled="
  581. attributeData.approvalStatus == 1 ||
  582. attributeData.approvalStatus == 2
  583. "
  584. ></el-input>
  585. </template>
  586. </ele-pro-table>
  587. </el-tab-pane>
  588. <el-tab-pane label="关键设备" name="关键设备">
  589. <ele-pro-table
  590. ref="deviceTabRef"
  591. :columns="standardCol"
  592. :datasource="datasource"
  593. :need-page="false"
  594. :immediate="true"
  595. >
  596. <!-- 表头工具栏 -->
  597. <template v-if="!isView" v-slot:toolbar>
  598. <el-button type="primary" @click="add">添加</el-button>
  599. </template>
  600. <template v-slot:action="{ row, $index }">
  601. <el-link type="danger" @click="handleDel(row, $index)"
  602. >删除</el-link
  603. >
  604. </template>
  605. </ele-pro-table>
  606. </el-tab-pane>
  607. <el-tab-pane label="制造资源" name="制造资源">
  608. <ele-pro-table
  609. ref="resourceTable"
  610. :columns="columns1"
  611. :datasource="datasource"
  612. :need-page="false"
  613. :immediate="true"
  614. >
  615. <!-- 表头工具栏 -->
  616. <template v-if="!isView" v-slot:toolbar>
  617. <el-button type="primary" @click="add">添加</el-button>
  618. </template>
  619. <template v-slot:action="{ row, $index }">
  620. <el-link type="primary" @click="handleDel(row, $index)"
  621. >删除</el-link
  622. >
  623. </template>
  624. <template v-slot:subCode="{ row }">
  625. <div v-if="isView">{{ row.subCode }}</div>
  626. <el-input
  627. v-else
  628. v-model="row.subCode"
  629. placeholder="请输入"
  630. ></el-input>
  631. </template>
  632. <template v-slot:isReworkBom="{ row }">
  633. <div v-if="isView">{{ isReworkBom[row.isReworkBom] }}</div>
  634. <div v-else>
  635. <el-select v-model="row.isReworkBom">
  636. <el-option
  637. v-for="item in isReworkBomList"
  638. :key="item.value"
  639. :label="item.label"
  640. :value="item.value"
  641. >
  642. </el-option>
  643. </el-select>
  644. </div>
  645. </template>
  646. <template v-slot:unit="{ row }">
  647. <div v-if="isView">{{ row.unit }}</div>
  648. <div v-else>
  649. <DictSelection
  650. dictName="计量单位"
  651. v-model="row.unit"
  652. ></DictSelection>
  653. </div>
  654. </template>
  655. <template v-slot:count="{ row }">
  656. <div v-if="isView">{{ row.count }}</div>
  657. <el-input
  658. v-else
  659. v-model="row.count"
  660. placeholder="请输入"
  661. @input="
  662. (value) =>
  663. (row.count = value.replace(
  664. /^(-)*(\d+)\.(\d\d\d\d\d\d).*$/,
  665. '$1$2.$3'
  666. ))
  667. "
  668. ></el-input>
  669. </template>
  670. <template v-slot:categoryName="{ row, $index }">
  671. <div v-if="isView">{{ row.categoryName }}</div>
  672. <div v-else
  673. ><el-input
  674. :value="row.categoryName"
  675. placeholder="请选择"
  676. @click.native="categorySelect(row, $index)"
  677. ></el-input
  678. ></div>
  679. </template>
  680. <template v-slot:bomArtFiles="{ row }">
  681. <fileUpload v-model="row.bomArtFiles" type="add" size="mini" />
  682. </template>
  683. <template v-slot:remark="{ row }">
  684. <div v-if="isView">{{ row.remark }}</div>
  685. <el-input
  686. v-else
  687. v-model="row.remark"
  688. placeholder="请输入"
  689. ></el-input>
  690. </template>
  691. </ele-pro-table>
  692. </el-tab-pane>
  693. <el-tab-pane label="工种" name="工种">
  694. <ele-pro-table
  695. ref="jobTable"
  696. :columns="jobColumns"
  697. :datasource="datasource"
  698. row-key="id"
  699. >
  700. <!-- 表头工具栏 -->
  701. <template v-slot:toolbar>
  702. <el-button
  703. size="small"
  704. type="primary"
  705. icon="el-icon-plus"
  706. class="ele-btn-icon"
  707. @click="addJob"
  708. >新增</el-button
  709. >
  710. </template>
  711. <template v-slot:action="{ row, $index }">
  712. <el-link type="primary" @click="handleDel(row, $index)"
  713. >删除</el-link
  714. >
  715. </template>
  716. </ele-pro-table>
  717. </el-tab-pane>
  718. <el-tab-pane label="工艺文件" name="工艺文件">
  719. <ele-pro-table
  720. ref="fileTable"
  721. :columns="jobColumns1"
  722. :datasource="datasource"
  723. :need-page="false"
  724. :immediate="true"
  725. >
  726. <template v-if="!isView" v-slot:toolbar>
  727. <el-button type="primary" @click="addFile">添加</el-button>
  728. </template>
  729. <template v-slot:action="{ row, $index }">
  730. <el-link type="primary" @click="handleDel(row, $index)"
  731. >删除</el-link
  732. >
  733. <el-link type="primary" @click="fileDetails(row)">详情</el-link>
  734. </template>
  735. </ele-pro-table>
  736. </el-tab-pane>
  737. <el-tab-pane label="标准产出" name="标准产出">
  738. <ele-pro-table
  739. ref="standard"
  740. :columns="standardCol"
  741. :datasource="datasource"
  742. :need-page="false"
  743. :immediate="true"
  744. >
  745. <!-- 表头工具栏 -->
  746. <template v-if="!isView" v-slot:toolbar>
  747. <el-button type="primary" @click="add">添加</el-button>
  748. </template>
  749. <template v-slot:action="{ row, $index }">
  750. <el-link type="danger" @click="handleDel(row, $index)"
  751. >删除</el-link
  752. >
  753. </template>
  754. </ele-pro-table>
  755. </el-tab-pane>
  756. <el-tab-pane label="过程控制" name="过程控制">
  757. <userSettingMatterProcess
  758. :produce-task-id="rowData.sourceTaskId"
  759. :produce-task-name="rowData.name"
  760. :produce-task-code="rowData.code"
  761. :bom-category-id="resourceBomId"
  762. ref="userSettingMatterProcessRef"
  763. ></userSettingMatterProcess>
  764. </el-tab-pane>
  765. <el-tab-pane label="首件两检" name="首件两检">
  766. <term
  767. :qualityParam="firstArticleDualInspectionParam"
  768. :isView="isView"
  769. ref="firstArticleDualInspectionParamRef"
  770. ></term>
  771. </el-tab-pane>
  772. <el-tab-pane label="NC程序" name="NC程序">
  773. <ele-pro-table
  774. ref="ncFileTable"
  775. :columns="jobColumns2"
  776. :datasource="ncCodeList"
  777. :need-page="false"
  778. :immediate="true"
  779. >
  780. <!-- 表头工具栏 -->
  781. <template v-if="!isView" v-slot:toolbar>
  782. <el-button type="primary" @click="addFile('ncCodeList')"
  783. >添加</el-button
  784. >
  785. </template>
  786. <template v-slot:action="{ row, $index }">
  787. <el-link type="primary" @click="handleDel(row, $index)"
  788. >删除</el-link
  789. >
  790. <el-link type="primary" @click="fileDetails(row, 'nc')"
  791. >详情</el-link
  792. >
  793. </template>
  794. </ele-pro-table>
  795. </el-tab-pane>
  796. </el-tabs>
  797. </el-card>
  798. <!-- 选择工艺参数 -->
  799. <jobDialog ref="jobRef" @chooseModal="chooseJob"></jobDialog>
  800. <ParamModal ref="paramRefs" @chooseModal="chooseModal"></ParamModal>
  801. <ProductModal ref="productRefs" @changeProduct="determineChoose" />
  802. <ProductModalMultiple
  803. ref="productMultipleRefs"
  804. @selection="addProductList"
  805. ></ProductModalMultiple>
  806. <standardOutput
  807. ref="standardOutputRefs"
  808. @selection="chooseStandardList"
  809. ></standardOutput>
  810. <fileIndex v-if="fileShow" @close="fileClose"></fileIndex>
  811. <fileBrowse ref="browseRef"></fileBrowse>
  812. <replaceMaterialPop
  813. ref="replaceMaterialRef"
  814. @selected="replaceSelected"
  815. :isView="isView"
  816. ></replaceMaterialPop>
  817. <mbomDatailList ref="bomDetailList"></mbomDatailList>
  818. <div class="btns">
  819. <el-button
  820. type="primary"
  821. size="small"
  822. v-if="!isView"
  823. @click="save('save')"
  824. >
  825. 保存</el-button
  826. >
  827. <el-button type="primary" size="small" @click="save('close')">{{
  828. isView ? '确定' : '保存并关闭'
  829. }}</el-button>
  830. <el-button size="small" @click="handleClose">关闭</el-button>
  831. </div>
  832. </ele-modal>
  833. </template>
  834. <script>
  835. import dictMixins from '@/mixins/dictMixins';
  836. import * as dayjs from 'dayjs';
  837. import { getFile } from '@/api/system/file';
  838. // import fileUpload from '@/components/addDoc/index.vue';
  839. import { workingProcedureUpdate } from '@/api/material/BOM';
  840. import ParamModal from '@/views/technology/productParam/components/ParamModal.vue';
  841. import ProductModal from '@/components/select/bom/ProductModal.vue';
  842. import { getByCode } from '@/api/system/dictionary-data';
  843. import ProductModalMultiple from './ProductModalMultiple.vue';
  844. import userSearch from './user-search.vue';
  845. import jobDialog from './jobDialog.vue';
  846. import standardOutput from './standardOutput.vue';
  847. import term from '../qualityTesting/term';
  848. import fileIndex from '../file/index.vue';
  849. import fileBrowse from '../file/fileBrowse.vue';
  850. import replaceMaterialPop from './replaceMaterialPop.vue';
  851. import { newFilePageAPI } from '@/api/material/file';
  852. import { getBomGetById, getDetailList } from '@/api/material/BOM.js';
  853. import mbomDatailList from './mbomDatailList.vue';
  854. import { setFileUrl } from '@/components/addDoc/util.js';
  855. import userSettingMatterProcess from '@/views/technology/production/components/user-setting-matter-process.vue';
  856. export default {
  857. components: {
  858. userSearch,
  859. ParamModal,
  860. // fileUpload,
  861. ProductModal,
  862. jobDialog,
  863. ProductModalMultiple,
  864. standardOutput,
  865. term,
  866. fileIndex,
  867. fileBrowse,
  868. replaceMaterialPop,
  869. mbomDatailList,
  870. userSettingMatterProcess
  871. },
  872. mixins: [dictMixins],
  873. data() {
  874. return {
  875. rules: {
  876. baseCount: [
  877. { required: true, message: '请输入基本数量', trigger: 'blur' }
  878. ],
  879. baseCountUnit: [
  880. { required: true, message: '请选择单位', trigger: 'change' }
  881. ]
  882. },
  883. form: {
  884. baseCount: 0,
  885. baseCountUnit: ''
  886. },
  887. baseCountUnit: '',
  888. baseCount2: '',
  889. baseCountUnit2: '',
  890. isView: false,
  891. filedList: [],
  892. jobFiledList: [],
  893. activeName: '工艺参数',
  894. attributeData: {},
  895. visible: false,
  896. title: '配置',
  897. statusOption: [
  898. {
  899. label: '启用',
  900. value: 1
  901. },
  902. {
  903. label: '停用',
  904. value: 0
  905. }
  906. ],
  907. isReworkBom: ['否', '是'],
  908. isReworkBomList: [
  909. { label: '否', value: 0 },
  910. { label: '是', value: 1 }
  911. ],
  912. dictList: [], //单位下拉
  913. // 表格列配置
  914. columns1: [],
  915. defaultColumns1: [
  916. {
  917. type: 'index',
  918. width: 55,
  919. align: 'center'
  920. },
  921. {
  922. label: '子项编号',
  923. prop: 'subCode',
  924. slot: 'subCode',
  925. action: 'subCode'
  926. },
  927. {
  928. label: '物料名称',
  929. prop: 'categoryName',
  930. slot: 'categoryName',
  931. action: 'categoryName'
  932. },
  933. {
  934. label: '是否回收料',
  935. prop: 'isReworkBom',
  936. slot: 'isReworkBom',
  937. action: 'isReworkBom'
  938. },
  939. {
  940. label: '编码',
  941. prop: 'categoryCode'
  942. },
  943. {
  944. label: '牌号',
  945. prop: 'brandNum'
  946. },
  947. {
  948. label: '型号',
  949. prop: 'modelType'
  950. },
  951. {
  952. prop: 'specification',
  953. label: '规格',
  954. align: 'center',
  955. showOverflowTooltip: true
  956. },
  957. {
  958. label: '数量',
  959. slot: 'count',
  960. action: 'count'
  961. },
  962. {
  963. label: '单位',
  964. slot: 'unit',
  965. action: 'unit'
  966. },
  967. {
  968. label: '附件',
  969. slot: 'bomArtFiles',
  970. action: 'bomArtFiles',
  971. minWidth: 150
  972. },
  973. {
  974. label: '备注',
  975. slot: 'remark',
  976. action: 'remark'
  977. }
  978. ],
  979. columns: [],
  980. // 表格列配置
  981. defaultColumns: [
  982. {
  983. prop: 'sort',
  984. slot: 'sort',
  985. label: '排序',
  986. minWidth: 60
  987. },
  988. {
  989. prop: 'code',
  990. label: '参数编码',
  991. showOverflowTooltip: true,
  992. align: 'center',
  993. minWidth: 110
  994. },
  995. {
  996. prop: 'name',
  997. label: '参数名称',
  998. showOverflowTooltip: true,
  999. align: 'center',
  1000. minWidth: 110
  1001. },
  1002. {
  1003. align: 'center',
  1004. prop: 'description',
  1005. label: '文本描述',
  1006. showOverflowTooltip: true,
  1007. minWidth: 110
  1008. },
  1009. {
  1010. prop: 'maxValue',
  1011. slot: 'maxValue',
  1012. label: '参数上限',
  1013. align: 'center'
  1014. },
  1015. {
  1016. prop: 'minValue',
  1017. slot: 'minValue',
  1018. label: '参数下限',
  1019. align: 'center'
  1020. },
  1021. {
  1022. prop: 'defaultValue',
  1023. slot: 'defaultValue',
  1024. label: '默认值',
  1025. align: 'center'
  1026. }
  1027. ],
  1028. levelOptions: [
  1029. {
  1030. label: '初级',
  1031. value: '1'
  1032. },
  1033. {
  1034. label: '中级',
  1035. value: '2'
  1036. },
  1037. {
  1038. label: '高级',
  1039. value: '3'
  1040. }
  1041. ],
  1042. // 表格列配置
  1043. jobColumns: [
  1044. {
  1045. label: '序号',
  1046. type: 'index',
  1047. width: 55,
  1048. align: 'center'
  1049. },
  1050. {
  1051. slot: 'type',
  1052. label: '类型',
  1053. showOverflowTooltip: true,
  1054. align: 'center',
  1055. minWidth: 110,
  1056. formatter: (_row) => {
  1057. return this.getDictValue('工种类型', _row.type);
  1058. }
  1059. },
  1060. {
  1061. align: 'center',
  1062. prop: 'code',
  1063. label: '编码',
  1064. showOverflowTooltip: true,
  1065. minWidth: 110
  1066. },
  1067. {
  1068. slot: 'name',
  1069. prop: 'name',
  1070. label: '名称',
  1071. showOverflowTooltip: true,
  1072. align: 'center',
  1073. minWidth: 110
  1074. },
  1075. {
  1076. slot: 'level',
  1077. prop: 'level',
  1078. label: '等级',
  1079. showOverflowTooltip: true,
  1080. align: 'center',
  1081. minWidth: 110,
  1082. formatter: (_row) => {
  1083. return this.levelOptions.filter(
  1084. (item) => _row.level == item.value
  1085. )[0].label;
  1086. }
  1087. },
  1088. {
  1089. slot: 'hourCost',
  1090. prop: 'hourCost',
  1091. label: '标准工时费',
  1092. showOverflowTooltip: true,
  1093. align: 'center',
  1094. minWidth: 110
  1095. },
  1096. {
  1097. columnKey: 'action',
  1098. label: '操作',
  1099. width: 260,
  1100. align: 'center',
  1101. resizable: false,
  1102. slot: 'action',
  1103. showOverflowTooltip: true
  1104. }
  1105. ],
  1106. // 表格选中数据
  1107. jobColumns1: [
  1108. {
  1109. label: '编码',
  1110. prop: 'code',
  1111. width: 180,
  1112. align: 'center',
  1113. showOverflowTooltip: true
  1114. },
  1115. {
  1116. prop: 'name',
  1117. label: '文档名称',
  1118. align: 'center',
  1119. slot: 'name',
  1120. showOverflowTooltip: true,
  1121. minWidth: 200
  1122. },
  1123. {
  1124. prop: 'storagePath',
  1125. label: '文件名称',
  1126. align: 'center',
  1127. showOverflowTooltip: true,
  1128. minWidth: 200,
  1129. formatter: (_row, _column, cellValue) => {
  1130. return cellValue[0]?.name;
  1131. }
  1132. },
  1133. {
  1134. prop: 'version',
  1135. label: '版本',
  1136. align: 'center',
  1137. showOverflowTooltip: true,
  1138. minWidth: 100
  1139. },
  1140. {
  1141. prop: 'createTime',
  1142. label: '创建时间',
  1143. showOverflowTooltip: true,
  1144. align: 'center',
  1145. minWidth: 110
  1146. },
  1147. {
  1148. columnKey: 'action',
  1149. label: '操作',
  1150. width: 260,
  1151. align: 'center',
  1152. resizable: false,
  1153. slot: 'action',
  1154. showOverflowTooltip: true
  1155. }
  1156. ],
  1157. // 表格选中数据
  1158. jobColumns2: [
  1159. {
  1160. columnKey: 'index',
  1161. label: '序号',
  1162. type: 'index',
  1163. width: 55,
  1164. align: 'center',
  1165. showOverflowTooltip: true
  1166. },
  1167. {
  1168. label: '编码',
  1169. prop: 'code',
  1170. width: 180,
  1171. align: 'center',
  1172. showOverflowTooltip: true
  1173. },
  1174. {
  1175. prop: 'name',
  1176. label: '名称',
  1177. align: 'center',
  1178. slot: 'name',
  1179. showOverflowTooltip: true,
  1180. minWidth: 200
  1181. },
  1182. {
  1183. prop: 'versions',
  1184. label: '版本',
  1185. align: 'center',
  1186. showOverflowTooltip: true,
  1187. minWidth: 100
  1188. },
  1189. {
  1190. prop: 'remark',
  1191. label: '文本描述',
  1192. align: 'center',
  1193. showOverflowTooltip: true,
  1194. minWidth: 200
  1195. },
  1196. {
  1197. prop: 'ncSize',
  1198. label: '文件大小',
  1199. align: 'center',
  1200. showOverflowTooltip: true,
  1201. minWidth: 100
  1202. },
  1203. {
  1204. prop: 'createName',
  1205. label: '创建人',
  1206. showOverflowTooltip: true,
  1207. align: 'center',
  1208. minWidth: 110
  1209. },
  1210. {
  1211. prop: 'createTime',
  1212. label: '创建时间',
  1213. showOverflowTooltip: true,
  1214. align: 'center',
  1215. minWidth: 110
  1216. },
  1217. {
  1218. columnKey: 'action',
  1219. label: '操作',
  1220. width: 260,
  1221. align: 'center',
  1222. resizable: false,
  1223. slot: 'action',
  1224. showOverflowTooltip: true
  1225. }
  1226. ],
  1227. standardCol: [
  1228. {
  1229. prop: 'code',
  1230. label: '编码'
  1231. },
  1232. {
  1233. prop: 'name',
  1234. label: '名称',
  1235. showOverflowTooltip: true
  1236. },
  1237. {
  1238. prop: 'brandNum',
  1239. label: '牌号'
  1240. },
  1241. {
  1242. prop: 'modelType',
  1243. label: '型号',
  1244. align: 'center',
  1245. showOverflowTooltip: true
  1246. },
  1247. {
  1248. prop: 'specification',
  1249. label: '规格',
  1250. align: 'center',
  1251. showOverflowTooltip: true
  1252. },
  1253. {
  1254. prop: 'measuringUnit',
  1255. label: '计量单位',
  1256. showOverflowTooltip: true,
  1257. minWidth: 90
  1258. },
  1259. {
  1260. columnKey: 'action',
  1261. label: '操作',
  1262. align: 'center',
  1263. resizable: false,
  1264. slot: 'action',
  1265. showOverflowTooltip: true
  1266. }
  1267. ],
  1268. rowData: {},
  1269. treeData: {},
  1270. currentIndex: 0,
  1271. tableData: {},
  1272. beatParam: {
  1273. newTime: '',
  1274. time: '',
  1275. newBeatPrepareTime: '',
  1276. beatPrepareTime: '',
  1277. newBeatTime: '',
  1278. beatTime: '',
  1279. newBeatRestTime: '',
  1280. beatRestTime: '',
  1281. taskPrice: ''
  1282. },
  1283. qualityParam: [],
  1284. ncCodeList: [],
  1285. firstArticleDualInspectionParam: [],
  1286. qualityPointParam: [],
  1287. fileShow: false,
  1288. resourceBomId: '',
  1289. level: '',
  1290. attributeData: {},
  1291. unitList: [],
  1292. fileListType: ''
  1293. };
  1294. },
  1295. created() {
  1296. this.requestDict('工种类型');
  1297. this.getDictList('time_unit');
  1298. this.getDicTUnitList('measuring_uint');
  1299. },
  1300. methods: {
  1301. addFile(fileListType) {
  1302. this.fileShow = true;
  1303. this.fileListType = fileListType;
  1304. },
  1305. fileClose(val) {
  1306. if (val == false) {
  1307. this.fileShow = false;
  1308. } else {
  1309. this.fileShow = false;
  1310. if (this.fileListType == 'ncCodeList') {
  1311. console.log(val, 'val');
  1312. this.ncCodeList.push(
  1313. ...val.map((item) => {
  1314. item.ncSize = item.sizeUnit;
  1315. item.versions = item.version;
  1316. item.fileId = item.id;
  1317. return item;
  1318. })
  1319. );
  1320. // this.tableData.taskParam[this.currentIndex].ncCodeList=this.tableData.taskParam[this.currentIndex].ncCodeList||[]
  1321. } else {
  1322. this.$refs.fileTable.setData([
  1323. ...val,
  1324. ...this.$refs.fileTable.getData()
  1325. ]);
  1326. this.$set(
  1327. this.tableData.taskParam[this.currentIndex],
  1328. 'fileParam',
  1329. this.$refs.fileTable.getData()
  1330. );
  1331. }
  1332. }
  1333. },
  1334. async getDicTUnitList(code) {
  1335. let { data: res } = await getByCode(code);
  1336. this.unitList = res.reduce((acc, curr) => {
  1337. let key = Object.keys(curr)[0]; // 获取当前对象的键
  1338. let value = curr[key]; // 获取当前对象的值
  1339. acc.push({ value, label: value }); // 将 { value, label } 格式的对象添加到数组中
  1340. return acc;
  1341. }, []); // 初始值为空数组 []
  1342. console.log(this.unitList, 'this.unitList');
  1343. },
  1344. handleInput(item) {
  1345. let newVal = item.count.replace(/[^\d.]/g, '');
  1346. // 2. 不能以点开头
  1347. if (newVal.startsWith('.')) {
  1348. newVal = '';
  1349. }
  1350. // 3. 只允许出现一个小数点
  1351. const firstDotIndex = newVal.indexOf('.');
  1352. if (firstDotIndex !== -1) {
  1353. newVal =
  1354. newVal.slice(0, firstDotIndex + 1) +
  1355. newVal.slice(firstDotIndex + 1).replace(/\./g, '');
  1356. }
  1357. // 4. 更新数据
  1358. item.count = newVal;
  1359. },
  1360. async detailsList() {
  1361. console.log(this.rowData, 'this.rowData');
  1362. await getDetailList({
  1363. bomType: this.attributeData.bomType,
  1364. bomCategoryId: this.resourceBomId,
  1365. taskId: this.rowData.id
  1366. }).then((res) => {
  1367. console.log(res);
  1368. this.$refs.materialTable.setData(res.data);
  1369. this.tableData.taskParam[this.currentIndex].materialQuota = res.data;
  1370. console.log(this.tableData, 'this.tableData');
  1371. });
  1372. // this.$refs.bomDetailList.open(this.resourceBomId, this.level)
  1373. },
  1374. fileDetails(row, type) {
  1375. if (type == 'nc') {
  1376. newFilePageAPI({
  1377. ids: "'" + row.fileId + "'"
  1378. }).then((res) => {
  1379. if (res.length) {
  1380. window.open(setFileUrl(res[0]));
  1381. }
  1382. });
  1383. } else {
  1384. window.open(setFileUrl(row));
  1385. }
  1386. },
  1387. addJob() {
  1388. this.$refs.jobRef.open();
  1389. },
  1390. chooseJob(data) {
  1391. this.$refs.jobTable.setData([
  1392. ...data,
  1393. ...this.$refs.jobTable.getData()
  1394. ]);
  1395. this.$set(
  1396. this.tableData.taskParam[this.currentIndex],
  1397. 'aptitudeParam',
  1398. this.$refs.jobTable.getData()
  1399. );
  1400. },
  1401. determineChoose(title, row, idx) {
  1402. let type = '';
  1403. if (this.activeName === '材料定额') {
  1404. type = 'materialQuota';
  1405. } else if (this.activeName === '制造资源') {
  1406. type = 'resource';
  1407. }
  1408. if (title == '选择物料') {
  1409. console.log(row, 'row');
  1410. this.$set(
  1411. this.tableData.taskParam[this.currentIndex][type][idx],
  1412. 'categoryName',
  1413. row.name
  1414. );
  1415. this.$set(
  1416. this.tableData.taskParam[this.currentIndex][type][idx],
  1417. 'categoryId',
  1418. row.id
  1419. );
  1420. this.$set(
  1421. this.tableData.taskParam[this.currentIndex][type][idx],
  1422. 'categoryCode',
  1423. row.code
  1424. );
  1425. this.$set(
  1426. this.tableData.taskParam[this.currentIndex][type][idx],
  1427. 'unit',
  1428. row.measuringUnit
  1429. );
  1430. this.$set(
  1431. this.tableData.taskParam[this.currentIndex][type][idx],
  1432. 'weightUnit',
  1433. row.weightUnit
  1434. );
  1435. this.$set(
  1436. this.tableData.taskParam[this.currentIndex][type][idx],
  1437. 'brandNum',
  1438. row.brandNum
  1439. );
  1440. this.$set(
  1441. this.tableData.taskParam[this.currentIndex][type][idx],
  1442. 'modelType',
  1443. row.modelType
  1444. );
  1445. this.$set(
  1446. this.tableData.taskParam[this.currentIndex][type][idx],
  1447. 'rootCategoryLevelId',
  1448. row.categoryLevelPathIdParent
  1449. );
  1450. this.$set(
  1451. this.tableData.taskParam[this.currentIndex][type][idx],
  1452. 'specification',
  1453. row.specification
  1454. );
  1455. this.$set(
  1456. this.tableData.taskParam[this.currentIndex][type][idx],
  1457. 'id',
  1458. row.id
  1459. );
  1460. }
  1461. },
  1462. uploadedSuccess(data, row) {
  1463. row.bomArtFiles = data[0].storePath;
  1464. this.filedList = [];
  1465. },
  1466. uploadedJobSuccess(data, row) {
  1467. row.path = data[0].storePath;
  1468. row.name = data[0].name;
  1469. this.jobFiledList = [];
  1470. },
  1471. downloadFile(url) {
  1472. getFile({ objectName: url }, '附件');
  1473. },
  1474. categorySelect(row, idx) {
  1475. this.$refs.productRefs.open(row, '选择物料', '1', idx);
  1476. },
  1477. handleDel(row, index) {
  1478. let type = '';
  1479. if (this.activeName === '材料定额') {
  1480. type = 'materialQuota';
  1481. } else if (this.activeName === '制造资源') {
  1482. type = 'resource';
  1483. } else if (this.activeName === '工种') {
  1484. type = 'aptitudeParam';
  1485. } else if (this.activeName === '工艺文件') {
  1486. type = 'fileParam';
  1487. } else if (this.activeName === '标准产出') {
  1488. type = 'standardOutput';
  1489. } else if (this.activeName === '关键设备') {
  1490. type = 'standardDevice';
  1491. } else if (this.activeName === 'NC程序') {
  1492. type = 'ncCodeList';
  1493. }
  1494. this.tableData.taskParam[this.currentIndex][type].splice(index, 1);
  1495. },
  1496. addProductList(list) {
  1497. let subCode = 0;
  1498. let array = [];
  1499. list.map((item, index) => {
  1500. let max = '';
  1501. if (
  1502. this.tableData.taskParam[this.currentIndex]['materialQuota']
  1503. .length > 0
  1504. ) {
  1505. max =
  1506. Math.max(
  1507. ...this.tableData.taskParam[this.currentIndex][
  1508. 'materialQuota'
  1509. ].map((i) => i.subCode)
  1510. ) +
  1511. 10 * ++index +
  1512. '';
  1513. if (max.length < 4) {
  1514. max = new Array(4 - max.length).fill('0').join('') + max;
  1515. }
  1516. } else {
  1517. max = 10 * ++index + '';
  1518. if (max.length < 4) {
  1519. max = new Array(4 - max.length).fill('0').join('') + max;
  1520. }
  1521. }
  1522. console.log('item', this.isValueANumber(item.specification));
  1523. if (
  1524. item.categoryLevelPathIdParent == 8 &&
  1525. this.isValueANumber(this.baseCount) &&
  1526. this.isValueANumber(item.specification)
  1527. ) {
  1528. let num = this.baseCount / item.specification;
  1529. item.count = num == 'Infinity' ? '' : num.toFixed(3);
  1530. }
  1531. subCode = max.substring(0, max.length - 1) + '0';
  1532. array.push({
  1533. subCode,
  1534. id: item.id,
  1535. categoryName: item.name,
  1536. categoryCode: item.code,
  1537. isReworkBom: 0,
  1538. brandNum: item.brandNum,
  1539. count: item.count || '',
  1540. modelType: item.modelType,
  1541. unit: item.measuringUnit,
  1542. bomArtFiles: [],
  1543. remark: '',
  1544. specification: item.specification,
  1545. rootCategoryLevelId: item.categoryLevelPathIdParent,
  1546. extInfo: item.extInfo
  1547. });
  1548. });
  1549. let _arr =
  1550. this.tableData.taskParam[this.currentIndex].materialQuota.concat(
  1551. array
  1552. );
  1553. let uniqueArray = [];
  1554. uniqueArray = _arr.reduce((acc, current) => {
  1555. const existing = acc.find((item) => item.id === current.id);
  1556. if (!existing) {
  1557. acc.push(current);
  1558. }
  1559. return acc;
  1560. }, []);
  1561. this.tableData.taskParam[this.currentIndex].materialQuota = uniqueArray;
  1562. this.$refs.materialTable.setData(
  1563. this.tableData.taskParam[this.currentIndex].materialQuota
  1564. );
  1565. },
  1566. isValueANumber(variable) {
  1567. if (variable === undefined || variable === null) {
  1568. return false; // 变量没有值
  1569. }
  1570. if (typeof variable === 'number') {
  1571. return true; // 基本类型的数字
  1572. }
  1573. if (
  1574. (typeof variable === 'string' &&
  1575. !isNaN(variable) &&
  1576. !variable.includes('.')) ||
  1577. (variable.includes('.') && !variable.endsWith('.'))
  1578. ) {
  1579. // 字符串类型的数字(注意:这个正则表达式判断较为简单,可能需要根据实际情况调整)
  1580. // 或者使用 Number.isFinite(parseFloat(variable)) 来代替这部分逻辑,但要注意性能开销和边缘情况
  1581. const num = Number(variable);
  1582. return !isNaN(num) && isFinite(num);
  1583. }
  1584. return false; // 其他类型
  1585. },
  1586. add() {
  1587. let subCode = '0010';
  1588. let type = '';
  1589. if (this.activeName === '材料定额') {
  1590. this.$refs.productMultipleRefs.open(1);
  1591. return;
  1592. } else if (this.activeName === '标准产出') {
  1593. this.$refs.standardOutputRefs.open(9);
  1594. return;
  1595. } else if (this.activeName === '关键设备') {
  1596. this.$refs.standardOutputRefs.open(4);
  1597. return;
  1598. } else if (this.activeName === '制造资源') {
  1599. type = 'resource';
  1600. }
  1601. console.log(this.tableData.taskParam[this.currentIndex]);
  1602. if (this.tableData.taskParam[this.currentIndex][type].length) {
  1603. let max =
  1604. Math.max(
  1605. ...this.tableData.taskParam[this.currentIndex][type].map(
  1606. (i) => i.subCode
  1607. )
  1608. ) +
  1609. 10 +
  1610. '';
  1611. if (max.length < 4) {
  1612. max = new Array(4 - max.length).fill('0').join('') + max;
  1613. }
  1614. subCode = max.substring(0, max.length - 1) + '0';
  1615. }
  1616. this.tableData.taskParam[this.currentIndex][type].push({
  1617. subCode,
  1618. bomArtFiles: [],
  1619. categoryId: '',
  1620. categoryName: '',
  1621. isReworkBom: 0,
  1622. brandNum: '',
  1623. count: '',
  1624. modelType: '',
  1625. unit: '',
  1626. rootCategoryLevelId: '',
  1627. categoryCode: '',
  1628. specification: '',
  1629. id: ''
  1630. });
  1631. },
  1632. /* 表格数据源 */
  1633. async datasource() {
  1634. return [];
  1635. },
  1636. tabsChange() {
  1637. console.log(this.activeName);
  1638. console.log(this.tableData.taskParam[this.currentIndex]);
  1639. if (this.activeName === '工艺参数') {
  1640. // 工艺参数
  1641. this.$refs.table.setData(
  1642. this.tableData.taskParam[this.currentIndex].produceList || []
  1643. );
  1644. } else if (this.activeName === '质检项参数') {
  1645. this.qualityParam =
  1646. this.tableData.taskParam[this.currentIndex].qualityParam || [];
  1647. } else if (this.activeName === '首件两检') {
  1648. this.firstArticleDualInspectionParam =
  1649. this.tableData.taskParam[this.currentIndex]
  1650. .firstArticleDualInspectionParam || [];
  1651. } else if (this.activeName === '生产节拍') {
  1652. this.beatParam =
  1653. this.tableData.taskParam[this.currentIndex].beatParam ||
  1654. this.beatParam;
  1655. } else if (this.activeName === '材料定额') {
  1656. this.$refs.materialTable.setData(
  1657. this.tableData.taskParam[this.currentIndex].materialQuota || []
  1658. );
  1659. } else if (this.activeName === '制造资源') {
  1660. this.$refs.resourceTable.setData(
  1661. this.tableData.taskParam[this.currentIndex].resource || []
  1662. );
  1663. } else if (this.activeName === '工种') {
  1664. if (
  1665. JSON.stringify(
  1666. this.tableData.taskParam[this.currentIndex].aptitudeParam
  1667. ) == '{}'
  1668. ) {
  1669. this.tableData.taskParam[this.currentIndex].aptitudeParam = [];
  1670. this.$refs.jobTable.setData([]);
  1671. } else {
  1672. this.$refs.jobTable.setData(
  1673. this.tableData.taskParam[this.currentIndex].aptitudeParam
  1674. );
  1675. }
  1676. } else if (this.activeName === '工艺文件') {
  1677. if (
  1678. JSON.stringify(
  1679. this.tableData.taskParam[this.currentIndex].fileParam
  1680. ) == '{}'
  1681. ) {
  1682. this.tableData.taskParam[this.currentIndex].fileParam = [];
  1683. this.$refs.fileTable.setData([]);
  1684. } else {
  1685. let fileId = this.tableData.taskParam[this.currentIndex].fileParam;
  1686. console.log('111111');
  1687. if (fileId.length > 0) {
  1688. this.fileParamDatasource(fileId);
  1689. }
  1690. // this.$refs.fileTable.setData(
  1691. // this.tableData.taskParam[this.currentIndex].fileParam
  1692. // );
  1693. }
  1694. } else if (this.activeName === '标准产出') {
  1695. this.$refs.standard.setData(
  1696. this.tableData.taskParam[this.currentIndex].standardOutput || []
  1697. );
  1698. } else if (this.activeName === '关键设备') {
  1699. this.$refs.deviceTabRef.setData(
  1700. this.tableData.taskParam[this.currentIndex].standardDevice || []
  1701. );
  1702. } else if (this.activeName === '过程控制') {
  1703. // 过程控制数据查询
  1704. }
  1705. },
  1706. openParam(type) {
  1707. let tableData = [];
  1708. if (type === '工艺') {
  1709. tableData = this.$refs.table.getData();
  1710. } else {
  1711. tableData = this.$refs.qualityTable.getData();
  1712. }
  1713. this.$refs.paramRefs.open(tableData);
  1714. },
  1715. chooseModal(data) {
  1716. let dom = null;
  1717. if (this.activeName === '工艺参数') {
  1718. dom = this.$refs.table;
  1719. }
  1720. dom.setData([...data, ...dom.getData()]);
  1721. this.$set(
  1722. this.tableData.taskParam[this.currentIndex],
  1723. this.activeName === '工艺参数' ? 'produceList' : '',
  1724. dom.getData()
  1725. );
  1726. },
  1727. chooseStandardList(type, data) {
  1728. let dom = null;
  1729. if (type == 9) {
  1730. dom = this.$refs.standard;
  1731. dom.setData([data[0]]);
  1732. this.$set(
  1733. this.tableData.taskParam[this.currentIndex],
  1734. 'standardOutput',
  1735. dom.getData()
  1736. );
  1737. } else if (type == 4) {
  1738. dom = this.$refs.deviceTabRef;
  1739. dom.setData([data[0]]);
  1740. this.$set(
  1741. this.tableData.taskParam[this.currentIndex],
  1742. 'standardDevice',
  1743. dom.getData()
  1744. );
  1745. }
  1746. },
  1747. remove(row, type) {
  1748. let dom = null;
  1749. if (type === '工艺') {
  1750. dom = this.$refs.table;
  1751. } else {
  1752. dom = this.$refs.qualityTable;
  1753. }
  1754. const data = dom.getData();
  1755. if (row.id) {
  1756. dom.setData(data.filter((d) => d.id !== row.id));
  1757. } else {
  1758. dom.setData(data.filter((d) => d.paramId !== row.paramId));
  1759. }
  1760. this.$set(
  1761. this.tableData.taskParam[this.currentIndex],
  1762. type === '工艺' ? 'produceList' : 'qualityParam',
  1763. dom.getData()
  1764. );
  1765. },
  1766. open(rowData, treeData, tableData, isView, attributeData, resourceBomId) {
  1767. // 工序信息
  1768. console.log('rowData', rowData);
  1769. // bom 信息
  1770. console.log('treeData', treeData);
  1771. // 工序信息列表 信息 包括工艺参数 材料定额等
  1772. console.log('tableData', tableData);
  1773. // 是否为详情 详情只能查看
  1774. console.log('isView', isView);
  1775. // bom 信息 和 treeData 一致
  1776. console.log('attributeData', attributeData);
  1777. // bom category id
  1778. console.log('resourceBomId', resourceBomId);
  1779. this.columns = [];
  1780. this.columns1 = [];
  1781. this.isView = isView; //true详情 false编辑
  1782. this.resourceBomId = resourceBomId;
  1783. this.attributeData = attributeData;
  1784. this.form.baseCount = attributeData.baseCount;
  1785. // if (rowData.baseCount) {
  1786. // this.form.baseCount = rowData.baseCount;
  1787. // } else {
  1788. // this.form.baseCount = attributeData.baseCount
  1789. // ? attributeData.baseCount
  1790. // : 1;
  1791. // }
  1792. // if (this.attributeData) {
  1793. // this.form.baseCount = this.attributeData.baseCount;
  1794. // } else {
  1795. // this.form.baseCount = 1;
  1796. // }
  1797. if (!this.isView) {
  1798. this.columns = this.defaultColumns.concat({
  1799. columnKey: 'action',
  1800. label: '操作',
  1801. align: 'center',
  1802. resizable: false,
  1803. slot: 'action',
  1804. showOverflowTooltip: true
  1805. });
  1806. this.columns1 = this.defaultColumns1.concat({
  1807. action: 'action',
  1808. slot: 'action',
  1809. label: '操作'
  1810. });
  1811. } else {
  1812. this.columns = this.defaultColumns;
  1813. this.columns1 = this.defaultColumns1;
  1814. }
  1815. this.rowData = JSON.parse(JSON.stringify(rowData));
  1816. this.treeData = JSON.parse(JSON.stringify(treeData));
  1817. this.tableData = JSON.parse(JSON.stringify(tableData));
  1818. this.currentIndex = tableData.taskParam.findIndex(
  1819. (item) => item.id === rowData.id
  1820. );
  1821. console.log('currentIndex', this.currentIndex);
  1822. this.activeName = '工艺参数';
  1823. // this.baseCount = rowData.baseCount;
  1824. // this.baseCountUnit = rowData.baseCountUnit;
  1825. console.log(rowData, 'rowData');
  1826. // this.form.baseCount = rowData.baseCount || 1;
  1827. this.form.baseCountUnit = rowData.baseCountUnit;
  1828. this.baseCount2 = rowData.baseCount2;
  1829. this.baseCountUnit2 = rowData.baseCountUnit2;
  1830. this.ncCodeList =
  1831. this.tableData.taskParam[this.currentIndex].ncCodeList || [];
  1832. this.visible = true;
  1833. setTimeout(() => {
  1834. console.log(this.$refs);
  1835. // 工艺参数
  1836. this.$refs.table.setData(
  1837. this.tableData.taskParam[this.currentIndex]?.produceList || []
  1838. );
  1839. this.$refs.userSettingMatterProcessRef.getMatterList();
  1840. }, 500);
  1841. this.getBomLevel();
  1842. },
  1843. async getBomLevel() {
  1844. await getBomGetById(this.resourceBomId).then((res) => {
  1845. if (res.data.level) {
  1846. this.level = res.data.level;
  1847. }
  1848. });
  1849. },
  1850. handleClose() {
  1851. this.visible = false;
  1852. this.$refs.table.setSelectedRows([]);
  1853. this.selection = [];
  1854. },
  1855. save(type) {
  1856. if (this.activeName == '材料定额') {
  1857. }
  1858. this.$refs.form.validate((valid) => {
  1859. let isYs = true;
  1860. if (this.activeName == '材料定额') {
  1861. isYs = valid;
  1862. }
  1863. if (isYs) {
  1864. if (this.isView) {
  1865. this.handleClose();
  1866. } else {
  1867. // 保存生产节拍
  1868. let userInfo = JSON.parse(localStorage.getItem('info'));
  1869. this.beatParam.createName = userInfo.name;
  1870. this.beatParam.createTime = dayjs(new Date()).format(
  1871. 'YYYY-MM-DD HH:mm:ss'
  1872. );
  1873. this.beatParam.updateName = userInfo.name;
  1874. this.beatParam.updateTime = dayjs(new Date()).format(
  1875. 'YYYY-MM-DD HH:mm:ss'
  1876. );
  1877. this.tableData.taskParam[this.currentIndex].beatParam =
  1878. this.beatParam;
  1879. // 保存材料定额
  1880. this.tableData.taskParam[this.currentIndex].baseCount =
  1881. this.form.baseCount;
  1882. this.tableData.taskParam[this.currentIndex].baseCountUnit =
  1883. this.form.baseCountUnit;
  1884. const isCount = this.tableData.taskParam[
  1885. this.currentIndex
  1886. ].materialQuota.every((item) => {
  1887. if (!item.count) {
  1888. return false;
  1889. }
  1890. return true;
  1891. });
  1892. if (!isCount) {
  1893. this.$message.warning('材料定额数量不能为空');
  1894. return;
  1895. }
  1896. this.tableData.taskParam[this.currentIndex].baseCount2 =
  1897. this.baseCount2;
  1898. this.tableData.taskParam[this.currentIndex].baseCountUnit2 =
  1899. this.baseCountUnit2;
  1900. if (this.$refs.qualityParamRef) {
  1901. this.tableData.taskParam[this.currentIndex].qualityParam =
  1902. this.$refs.qualityParamRef.getDate() || [];
  1903. }
  1904. if (this.$refs.firstArticleDualInspectionParamRef) {
  1905. this.tableData.taskParam[
  1906. this.currentIndex
  1907. ].firstArticleDualInspectionParam =
  1908. this.$refs.firstArticleDualInspectionParamRef.getDate() || [];
  1909. }
  1910. //工艺文件只传id
  1911. let fileParamArr = JSON.parse(
  1912. JSON.stringify(this.tableData.taskParam)
  1913. );
  1914. fileParamArr.map((item, index) => {
  1915. if (item.fileParam.length > 0) {
  1916. let val = [];
  1917. item.fileParam.map((fileItem) => {
  1918. let obj = {
  1919. id: fileItem.id
  1920. };
  1921. val.push(obj);
  1922. });
  1923. this.$set(this.tableData.taskParam[index], 'fileParam', val);
  1924. }
  1925. });
  1926. this.$set(
  1927. this.tableData.taskParam[this.currentIndex],
  1928. 'ncCodeList',
  1929. this.ncCodeList
  1930. );
  1931. // 保存过程控制事项
  1932. this.$refs.userSettingMatterProcessRef?.saveMatterList();
  1933. workingProcedureUpdate({
  1934. id: this.tableData.id,
  1935. categoryId: this.treeData.categoryId,
  1936. bomCategoryId: this.treeData.id,
  1937. categoryCode: this.treeData.categoryCode,
  1938. taskParam: this.tableData.taskParam
  1939. }).then(() => {
  1940. this.$message.success('保存成功');
  1941. this.$emit('chooseProcess');
  1942. if (type === 'close') {
  1943. this.handleClose();
  1944. }
  1945. });
  1946. }
  1947. }
  1948. });
  1949. },
  1950. //工艺文件表格回显
  1951. fileParamDatasource(fileParam) {
  1952. let fileId = fileParam.map((item) => item.id).join(',');
  1953. newFilePageAPI({
  1954. // pageNum: 1,
  1955. // size: 999,
  1956. // directoryId: null,
  1957. // lcyStatus: 1,
  1958. // fileType: 0,
  1959. // ids: fileId
  1960. ids: "'" + fileId + "'"
  1961. }).then((res) => {
  1962. this.$refs.fileTable.setData(res);
  1963. });
  1964. },
  1965. async getDictList(code) {
  1966. let { data: res } = await getByCode(code);
  1967. this.dictList = res.reduce((acc, curr) => {
  1968. let key = Object.keys(curr)[0]; // 获取当前对象的键
  1969. let value = curr[key]; // 获取当前对象的值
  1970. acc.push({ value, label: value }); // 将 { value, label } 格式的对象添加到数组中
  1971. return acc;
  1972. }, []); // 初始值为空数组 []
  1973. },
  1974. convertToSeconds(time) {
  1975. switch (this.beatParam.unit) {
  1976. case '秒':
  1977. return time;
  1978. case '分钟':
  1979. return time * 60;
  1980. case '小时':
  1981. return time * 3600;
  1982. case '天':
  1983. return time * 86400; // 24小时 * 60分钟 * 60秒
  1984. case '月':
  1985. // 近似值,一个月按30天计算
  1986. return time * 86400 * 30;
  1987. case '年':
  1988. // 近似值,一年按365天计算
  1989. return time * 86400 * 365;
  1990. case '毫秒':
  1991. return time / 1000;
  1992. case '微秒':
  1993. return time / 1000000;
  1994. default:
  1995. this.$message.error('不支持的时间单位: ' + unit);
  1996. }
  1997. },
  1998. convertVal(val, name) {
  1999. if (!this.beatParam.unit) {
  2000. return this.$message.error('请选择时间单位');
  2001. }
  2002. const isNumeric = /^\d*(\.\d+)?$/.test(val);
  2003. if (isNumeric) {
  2004. this.beatParam[name] = this.convertToSeconds(val);
  2005. } else {
  2006. this.$message.error('请输入数字');
  2007. this.beatParam[name] = '';
  2008. }
  2009. },
  2010. changeUnit() {
  2011. this.beatParam.newTime = '';
  2012. this.beatParam.time = '';
  2013. this.beatParam.newBeatPrepareTime = '';
  2014. this.beatParam.beatPrepareTime = '';
  2015. this.beatParam.newBeatTime = '';
  2016. this.beatParam.beatTime = '';
  2017. this.beatParam.newBeatRestTime = '';
  2018. this.beatParam.beatRestTime = '';
  2019. this.beatParam.taskPrice = '';
  2020. },
  2021. handSubstitution(row) {
  2022. this.$refs.replaceMaterialRef.open(row);
  2023. },
  2024. replaceSelected(id, list) {
  2025. let _arr = [];
  2026. _arr = this.tableData.taskParam[this.currentIndex].materialQuota;
  2027. _arr.forEach((item) => {
  2028. if (item.id === id) {
  2029. item.replaceMaterial = list;
  2030. }
  2031. });
  2032. this.tableData.taskParam[this.currentIndex].materialQuota = _arr;
  2033. }
  2034. }
  2035. };
  2036. </script>
  2037. <style lang="scss" scoped>
  2038. .btns {
  2039. text-align: center;
  2040. padding: 10px 0;
  2041. }
  2042. .downLoad {
  2043. display: flex;
  2044. }
  2045. .toolbar_box {
  2046. float: right;
  2047. margin-right: 10px;
  2048. > div {
  2049. display: flex;
  2050. align-items: center;
  2051. justify-content: center;
  2052. > span {
  2053. width: 150px;
  2054. }
  2055. > div {
  2056. margin-left: 10px;
  2057. }
  2058. }
  2059. }
  2060. .item-height {
  2061. margin-bottom: 20px;
  2062. }
  2063. </style>