deorderdetail.vue 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766
  1. <template>
  2. <div class="BidSystemProductDeOrderDeorderdetail">
  3. <Modal class-name="vertical-modal" title='保存' v-model='modal_show' :width="400" @on-ok="postData"
  4. @on-cancel="modal_show = false" :height='300'>
  5. <span>确认保存吗?</span>
  6. </Modal>
  7. <Toptitle
  8. :title="type == 1 ? '拆单编辑' : type == 2 ? '拆单详情' : '拆单变更'"
  9. >
  10. <slot name="titleButton">
  11. <Button
  12. @click="goback()"
  13. type="primary"
  14. ghost
  15. style="margin-right: 10px"
  16. >返回</Button
  17. >
  18. <Button
  19. @click="modal_show = true"
  20. type="primary"
  21. v-if="type != 2"
  22. ghost
  23. style="margin-right: 10px"
  24. >{{ type == 3 ? "变更完成" : "保存" }}</Button
  25. >
  26. </slot>
  27. </Toptitle>
  28. <div class="top_info">
  29. <div><span>产品名称:</span>{{ formData.title }}</div>
  30. <div><span>计量单位:</span>{{ formData.unit }}</div>
  31. <div><span>数量:</span>{{ formData.num }}</div>
  32. <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
  33. <div><span>规格:</span>{{ formData.measure }}</div>
  34. <div style="width:auto">
  35. <span>工艺属性:</span>{{ formData.process_property }}
  36. </div>
  37. <div style="overflow:hidden;">
  38. <span>图纸:</span>
  39. <div>
  40. <span
  41. v-for="item in formData.url"
  42. :key="item"
  43. @click="checkImg(formData.url)"
  44. >
  45. <img :src="$store.state.ip + item" alt="" />
  46. </span>
  47. </div>
  48. </div>
  49. <div><span>图号:</span>{{ formData.url_number }}</div>
  50. <div><span>备注:</span>{{ formData.remark }}</div>
  51. </div>
  52. <div class="similar_product">
  53. <!-- <div>
  54. <span>价格:</span>
  55. <Input
  56. type="text"
  57. size="small"
  58. :disabled="type == 2"
  59. v-model="formData.real_price"
  60. style="width: 150px; margin-right: 10px"
  61. placeholder="请输入价格"
  62. />
  63. </div> -->
  64. <div>
  65. <span>型号:</span>
  66. <Input
  67. type="text"
  68. size="small"
  69. :disabled="type == 2"
  70. v-model="formData.model"
  71. style="width: 150px; margin-right: 10px"
  72. placeholder="请输入型号"
  73. />
  74. </div>
  75. <div>
  76. <div
  77. style="
  78. display: flex;
  79. align-items: center;
  80. width: 100%;
  81. margin-right: 10px;
  82. "
  83. >
  84. <Dropdown>
  85. <a :disabled="type == 2">选择产品分类</a>
  86. <DropdownMenu slot="list">
  87. <Downtree
  88. @childByValue="handleClick"
  89. :parent="productTypes"
  90. ></Downtree>
  91. </DropdownMenu>
  92. </Dropdown>
  93. <a
  94. :disabled="type == 2"
  95. style="margin-left: 20px"
  96. v-if="nowSelectObj.title"
  97. >{{ nowSelectObj.title || "" }}</a
  98. >
  99. </div>
  100. </div>
  101. <Button
  102. @click="handleSimilarProductShow"
  103. type="primary"
  104. :disabled="type == 2"
  105. style="margin-right: 10px"
  106. >选择相似产品</Button
  107. >
  108. </div>
  109. <div
  110. class="parts"
  111. v-for="(partsItem, partsIndex) in formData.parts"
  112. :key="partsIndex"
  113. >
  114. <div class="parts_title">
  115. <h2>部件{{ partsIndex + 1 }}</h2>
  116. <div>
  117. <Button
  118. @click="handlePartAdd(partsItem, partsIndex)"
  119. type="success"
  120. size="small"
  121. :disabled="type == 2"
  122. style="margin-right: 10px"
  123. >新增部件</Button
  124. >
  125. <Button
  126. @click="handlePartCopy(partsItem, partsIndex)"
  127. type="primary"
  128. :disabled="type == 2"
  129. size="small"
  130. style="margin-right: 10px"
  131. >复制部件</Button
  132. >
  133. <Button
  134. @click="handlePartDele(partsItem, partsIndex)"
  135. v-show="formData.parts.length > 1"
  136. type="error"
  137. :disabled="type == 2"
  138. size="small"
  139. style="margin-right: 10px"
  140. >删除部件</Button
  141. >
  142. </div>
  143. </div>
  144. <div class="parts_top">
  145. <Form :model="partsItem" :label-width="100">
  146. <FormItem label="部件分类名称:">
  147. <Select
  148. v-model="partsItem.parts_type"
  149. size="small"
  150. clearable
  151. filterable
  152. :disabled="type == 2"
  153. @on-change="(e) => handlePartsSelect(e, partsItem)"
  154. style="width: 150px"
  155. >
  156. <Option
  157. v-for="sitem in partsList"
  158. :key="sitem.id"
  159. :label="sitem.title"
  160. :value="sitem.id"
  161. >
  162. </Option>
  163. </Select>
  164. </FormItem>
  165. <FormItem label="标签:">
  166. <RadioGroup v-model="partsItem.pay_state" size="small">
  167. <Radio :label="1" :disabled="type == 2">是</Radio>
  168. <Radio :label="0" :disabled="type == 2">否</Radio>
  169. </RadioGroup>
  170. </FormItem>
  171. <FormItem label="部件名称:">
  172. <Select
  173. v-model="partsItem.part_id"
  174. size="small"
  175. clearable
  176. filterable
  177. allow-create
  178. label-in-value
  179. :disabled="type == 2"
  180. @on-create="(e) => handlePartTitleCreate(partsItem, e)"
  181. @on-change="(e) => handlePartsNameSelect(partsItem, e)"
  182. style="width: 150px"
  183. >
  184. <Option
  185. v-for="sitem in partsItem.partsNameList"
  186. :key="sitem.id"
  187. :label="sitem.title + ''"
  188. :value="sitem.id"
  189. >
  190. </Option>
  191. </Select>
  192. </FormItem>
  193. <FormItem label="单位:">
  194. <Input
  195. type="text"
  196. size="small"
  197. :disabled="type == 2"
  198. v-model="partsItem.company"
  199. style="width: 150px"
  200. placeholder="请输入单位"
  201. />
  202. </FormItem>
  203. <!-- <FormItem label="工艺价格:">
  204. <Input
  205. type="text"
  206. size="small"
  207. :disabled="!partsItem.isAddProcessRoute || type == 2"
  208. v-model="partsItem.process_price"
  209. style="width: 150px"
  210. placeholder="请输入工艺价格"
  211. />
  212. </FormItem> -->
  213. <FormItem label="高:">
  214. <Input
  215. type="text"
  216. size="small"
  217. @on-search="openKey(partsIndex, -1, 'long', partsItem)"
  218. :disabled="type == 2"
  219. v-model="partsItem.long"
  220. style="width: 150px"
  221. placeholder="请输入高"
  222. search
  223. enter-button="公式"
  224. />
  225. </FormItem>
  226. <FormItem label="宽:">
  227. <Input
  228. type="text"
  229. size="small"
  230. @on-search="openKey(partsIndex, -1, 'wide', partsItem)"
  231. :disabled="type == 2"
  232. v-model="partsItem.wide"
  233. style="width: 150px"
  234. placeholder="请输入宽"
  235. search
  236. enter-button="公式"
  237. />
  238. </FormItem>
  239. <FormItem label="厚:">
  240. <Input
  241. type="text"
  242. size="small"
  243. @on-search="openKey(partsIndex, -1, 'thick', partsItem)"
  244. :disabled="type == 2"
  245. v-model="partsItem.thick"
  246. style="width: 150px"
  247. placeholder="请输入厚"
  248. search
  249. enter-button="公式"
  250. />
  251. </FormItem>
  252. <FormItem label="产值比例(%):">
  253. <Input
  254. type="text"
  255. size="small"
  256. :disabled="type == 2"
  257. @on-blur="(e) => handleProportionEdit(e, partsItem, partsIndex)"
  258. v-model="partsItem.proportion"
  259. style="width: 150px"
  260. placeholder="请输入产值比"
  261. />
  262. </FormItem>
  263. <FormItem
  264. v-for="item of partsItem.ProcessAttrList"
  265. :key="item.id + ''"
  266. :label="(item.name || item.title) + ':'"
  267. >
  268. <Select
  269. v-model="item.selected_value"
  270. size="small"
  271. clearable
  272. filterable
  273. :disabled="type == 2"
  274. @on-change="(e) => handleProcessSelect(partsItem, e)"
  275. style="width: 150px"
  276. >
  277. <OptionGroup
  278. v-for="OptionGroup in item.cld"
  279. :key="OptionGroup.type_title"
  280. :label="OptionGroup.type_title + ''"
  281. >
  282. <Option
  283. v-for="Option in OptionGroup.list"
  284. :value="Option.id"
  285. :key="Option.id + ''"
  286. >{{ Option.title }}</Option
  287. >
  288. </OptionGroup>
  289. <Option
  290. v-for="sitem in item.partsNameList"
  291. :key="sitem.id"
  292. :label="sitem.title + ''"
  293. :value="sitem.id"
  294. >
  295. </Option>
  296. </Select>
  297. </FormItem>
  298. </Form>
  299. </div>
  300. <div class="parts_content">
  301. <!-- <span>工艺属性:</span>
  302. <div
  303. class="hierarchy"
  304. v-for="(item, index) of partsItem.ProcessAttrList"
  305. :key="item.id"
  306. >
  307. <span>{{ item.name || item.title }}(单选):</span>
  308. <div
  309. v-for="_item in item.cld"
  310. class="radio-g"
  311. :key="_item.type_title"
  312. >
  313. <div class="tit_box">
  314. <span :class="['box-us']" @click="setBoxChange(item, _item)">{{
  315. _item.type_title
  316. }}</span>
  317. </div>
  318. <div class="radio-box">
  319. <div
  320. v-for="__item in _item.list"
  321. @click="
  322. setRadioChange(_item, __item, index, partsItem, item.cld)
  323. "
  324. :class="['radio-us', __item.show ? 'radio-us-foc' : '']"
  325. :key="__item.id"
  326. >
  327. {{ __item.title }}
  328. </div>
  329. </div>
  330. </div>
  331. </div> -->
  332. <div style="display:flex;justify-content: space-between;">
  333. <div style="padding: 10px 0">
  334. <span>工艺路线:</span>
  335. <Button
  336. :disabled="type == 2"
  337. @click="editRouter(partsItem, partsIndex)"
  338. >选择工艺路线</Button
  339. >
  340. {{ partsItem.process_name }}
  341. </div>
  342. <div style="padding: 10px 0">
  343. <Button
  344. type="primary"
  345. @click="handleProcessLineShow(partsItem, partsIndex)"
  346. >{{ partsItem.isShowProcessLine ? "收起" : "展开" }}</Button
  347. >
  348. </div>
  349. </div>
  350. <div class="parts_content_lineTable">
  351. <Table
  352. :columns="partsProcessLineColumns"
  353. border
  354. :data="partsItem.partsProcessLineTableData"
  355. >
  356. <template slot="timeSlot" slot-scope="{ index }">
  357. <Input
  358. v-model="partsItem.partsProcessLineTableData[index].time"
  359. :disabled="type == 2"
  360. />
  361. </template>
  362. <template slot="wagesSlot" slot-scope="{ index }">
  363. <Input
  364. v-model="partsItem.partsProcessLineTableData[index].wages"
  365. :disabled="type == 2"
  366. />
  367. </template>
  368. <template slot="capacitySlot" slot-scope="{ index }">
  369. <Input
  370. v-model="partsItem.partsProcessLineTableData[index].capacity"
  371. :disabled="type == 2"
  372. />
  373. </template>
  374. </Table>
  375. </div>
  376. <div class="parts_content_part">
  377. <span>零部件添加</span>
  378. <Button
  379. @click="handlePartWoodAdd(partsIndex)"
  380. type="primary"
  381. size="small"
  382. ghost
  383. :disabled="type == 2"
  384. style="margin-right: 10px"
  385. >新增木板</Button
  386. >
  387. </div>
  388. <div class="parts_content_partTable">
  389. <Table
  390. :columns="partsPartColumns"
  391. border
  392. :data="partsItem.partsWoodTableData"
  393. >
  394. <template slot-scope="{ index }" slot="partNameSet">
  395. <Input
  396. placeholder="名称"
  397. :disabled="type == 2"
  398. v-model="partsItem.partsWoodTableData[index].spare_parts"
  399. />
  400. </template>
  401. <template slot-scope="{ row, index }" slot="partSpare_partsSet">
  402. <div>
  403. <Select
  404. filterable
  405. clearable
  406. :disabled="type == 2"
  407. label-in-value
  408. @on-change="changeSe($event, index, partsIndex, row)"
  409. v-model="partsItem.partsWoodTableData[index].material_id"
  410. >
  411. <Option
  412. :data-unit="item.unit"
  413. :tag="item.high"
  414. v-for="item of materialWoodList"
  415. :key="item.id"
  416. :value="item.id"
  417. :label="item.title + ''"
  418. ></Option>
  419. </Select>
  420. </div>
  421. </template>
  422. <template slot-scope="{ index }" slot="partNumberSet">
  423. <Input
  424. placeholder="数量"
  425. :disabled="type == 2"
  426. v-model="partsItem.partsWoodTableData[index].number"
  427. />
  428. </template>
  429. <template slot-scope="{ index }" slot="sortSet">
  430. <Input
  431. placeholder="行号"
  432. :disabled="type == 2"
  433. v-model="partsItem.partsWoodTableData[index].sort"
  434. />
  435. </template>
  436. <template slot-scope="{ index }" slot="rowSet">
  437. <Input
  438. placeholder="合并行号"
  439. :disabled="type == 2"
  440. v-model="partsItem.partsWoodTableData[index].row"
  441. />
  442. </template>
  443. <template slot-scope="{ index }" slot="partWoolLongSet">
  444. <Input
  445. @on-search="openKey(partsIndex, index, 'wool_long', partsItem)"
  446. :disabled="type == 2"
  447. placeholder="毛料高"
  448. search
  449. enter-button="公式"
  450. v-model="partsItem.partsWoodTableData[index].wool_long"
  451. />
  452. </template>
  453. <template slot-scope="{ index }" slot="partWoolWideSet">
  454. <Input
  455. @on-search="openKey(partsIndex, index, 'wool_wide', partsItem)"
  456. :disabled="type == 2"
  457. placeholder="毛料宽"
  458. search
  459. enter-button="公式"
  460. v-model="partsItem.partsWoodTableData[index].wool_wide"
  461. />
  462. </template>
  463. <template slot-scope="{ index }" slot="partLongSet">
  464. <Input
  465. @on-search="openKey(partsIndex, index, 'long', partsItem)"
  466. :disabled="type == 2"
  467. placeholder="精裁高"
  468. search
  469. enter-button="公式"
  470. v-model="partsItem.partsWoodTableData[index].long"
  471. />
  472. </template>
  473. <template slot-scope="{ index }" slot="partWideSet">
  474. <Input
  475. @on-search="openKey(partsIndex, index, 'wide', partsItem)"
  476. :disabled="type == 2"
  477. placeholder="精裁宽"
  478. search
  479. enter-button="公式"
  480. v-model="partsItem.partsWoodTableData[index].wide"
  481. />
  482. </template>
  483. <template slot-scope="{ index }" slot="partRequirementSet">
  484. <Select
  485. placeholder="工艺要求"
  486. filterable
  487. clearable
  488. :disabled="type == 2"
  489. v-model="
  490. partsItem.partsWoodTableData[index]
  491. .technological_requirement_id
  492. "
  493. >
  494. <Option
  495. v-for="item in processRequireList"
  496. :key="item.id"
  497. :value="item.id"
  498. :label="item.title + ''"
  499. ></Option>
  500. </Select>
  501. </template>
  502. <template slot-scope="{ index }" slot="partSub_numSet">
  503. <Select
  504. placeholder="贴面数"
  505. filterable
  506. clearable
  507. :disabled="type == 2"
  508. v-model="partsItem.partsWoodTableData[index].sub_num"
  509. >
  510. <Option :value="0" label="0"></Option>
  511. <Option :value="1" label="1"></Option>
  512. <Option :value="2" label="2"></Option>
  513. </Select>
  514. </template>
  515. <template slot-scope="{ index }" slot="partVeneer_idSet">
  516. <Select
  517. placeholder="贴木皮"
  518. filterable
  519. clearable
  520. :disabled="type == 2"
  521. v-model="partsItem.partsWoodTableData[index].veneer_id"
  522. >
  523. <Option
  524. v-for="item in materialWoodSkinList"
  525. :key="item.id"
  526. :value="item.id"
  527. :label="item.title"
  528. ></Option>
  529. </Select>
  530. </template>
  531. <template slot-scope="{ index }" slot="partPaint_idSet">
  532. <Select
  533. placeholder="油漆"
  534. filterable
  535. clearable
  536. :disabled="type == 2"
  537. v-model="partsItem.partsWoodTableData[index].paint_id"
  538. >
  539. <Option
  540. v-for="item in materialPaintList"
  541. :key="item.id"
  542. :value="item.id"
  543. :label="item.title"
  544. ></Option>
  545. </Select>
  546. </template>
  547. <template slot-scope="{ index }" slot="partLabelSet">
  548. <Select
  549. placeholder="标签"
  550. filterable
  551. clearable
  552. :disabled="type == 2"
  553. v-model="partsItem.partsWoodTableData[index].label"
  554. >
  555. <Option :value="1" label="小芯片"></Option>
  556. <Option :value="2" label="大芯片"></Option>
  557. <Option :value="3" label="否"></Option>
  558. <Option :value="4" label="标签"></Option>
  559. <Option :value="0" label="否"></Option>
  560. </Select>
  561. </template>
  562. <template slot-scope="{ index }" slot="partPrint_numSet">
  563. <Input
  564. placeholder="打印数量"
  565. :disabled="type == 2"
  566. v-model="partsItem.partsWoodTableData[index].print_num"
  567. />
  568. </template>
  569. <template slot="partSet" slot-scope="{ row, index }">
  570. <a
  571. style="margin: 0 5px"
  572. :disabled="type == 2"
  573. @click="handlePartWoodCopy(row, index, partsIndex)"
  574. >复制</a
  575. >
  576. <a
  577. :style="
  578. type == 2
  579. ? 'margin: 0 5px; color: #ccc'
  580. : 'margin: 0 5px; color: red'
  581. "
  582. :disabled="type == 2"
  583. @click="handlePartWoodDele(row, index, partsIndex)"
  584. >删除</a
  585. >
  586. </template>
  587. </Table>
  588. </div>
  589. <div class="parts_content_metals">
  590. <Button
  591. @click="handlePartMetalsAdd(partsIndex)"
  592. type="primary"
  593. size="small"
  594. :disabled="type == 2"
  595. ghost
  596. style="margin-right: 10px"
  597. >新增五金</Button
  598. >
  599. </div>
  600. <div class="parts_content_metalsTable">
  601. <Table
  602. :columns="partsMetalseColunms"
  603. border
  604. :data="partsItem.partsMetalseData"
  605. >
  606. <template slot="metalSpare_partsSet" slot-scope="{ index }">
  607. <Select
  608. filterable
  609. clearable
  610. :disabled="type == 2"
  611. @on-change="changeMetal($event, index, partsIndex)"
  612. label-in-value
  613. placeholder="请选择"
  614. v-model="partsItem.partsMetalseData[index].material_id"
  615. >
  616. <Option
  617. v-for="item in metalsList"
  618. :key="item.id"
  619. :data-unit="item.unit"
  620. :value="item.id"
  621. :label="item.title"
  622. ></Option>
  623. </Select>
  624. </template>
  625. <template slot-scope="{ index }" slot="metalNumberSet">
  626. <Input
  627. placeholder="数量"
  628. :disabled="type == 2"
  629. v-model="partsItem.partsMetalseData[index].number"
  630. />
  631. </template>
  632. <template slot-scope="{ index }" slot="metalPriceSet">
  633. <Input
  634. placeholder="单价"
  635. :disabled="type == 2"
  636. v-model="partsItem.partsMetalseData[index].price"
  637. />
  638. </template>
  639. <template slot="metalTotal_priceSet" slot-scope="{ row }">
  640. {{ row.number * row.price }}
  641. </template>
  642. <template slot="metalsSet" slot-scope="{ row, index }">
  643. <a
  644. style="margin: 0 5px"
  645. :disabled="type == 2"
  646. @click="handlePartMetalsCopy(row, index, partsIndex)"
  647. >复制</a
  648. >
  649. <a
  650. :style="
  651. type == 2
  652. ? 'margin: 0 5px; color: #ccc'
  653. : 'margin: 0 5px; color: red'
  654. "
  655. :disabled="type == 2"
  656. @click="handlePartMetalsDele(row, index, partsIndex)"
  657. >删除</a
  658. >
  659. </template>
  660. </Table>
  661. </div>
  662. </div>
  663. </div>
  664. <li v-for="item in formData.parts" v-show="false" :key="item.id"></li>
  665. <!-- 相似产品弹窗 -->
  666. <el-dialog
  667. title="选择相似产品"
  668. :visible.sync="showSimilarProductModal"
  669. :close-on-click-modal="false"
  670. :close-on-press-escape="false"
  671. class="similarProductModal"
  672. width="1000px"
  673. :before-close="handleClose"
  674. >
  675. <Form :label-width="100" :model="similarProductData">
  676. <FormItem label="产品分类">
  677. <el-cascader
  678. clearable
  679. v-model="similarProductData.type_id"
  680. size="small"
  681. style="width: 120px"
  682. :show-all-levels="false"
  683. :options="PDTTypeList"
  684. :props="{
  685. expandTrigger: 'hover',
  686. children: 'child',
  687. value: 'id',
  688. label: 'title',
  689. checkStrictly: true,
  690. emitPath: false,
  691. }"
  692. ></el-cascader>
  693. <!-- <Select
  694. v-model="similarProductData.type_name"
  695. placeholder="请选择"
  696. style="width: 120px"
  697. size="small"
  698. >
  699. <Option
  700. v-for="item in PDTTypeList"
  701. :value="item.title"
  702. :key="item.title"
  703. :label="item.title"
  704. ></Option>
  705. </Select> -->
  706. </FormItem>
  707. <FormItem label="产品名称:">
  708. <Input
  709. type="text"
  710. size="small"
  711. clearable
  712. v-model="similarProductData.title"
  713. style="width: 120px"
  714. />
  715. </FormItem>
  716. <FormItem label="产品型号">
  717. <Input
  718. type="text"
  719. size="small"
  720. clearable
  721. v-model="similarProductData.model"
  722. placeholder="请输入"
  723. style="width: 120px"
  724. />
  725. </FormItem>
  726. <FormItem label="图号:">
  727. <Input
  728. type="text"
  729. size="small"
  730. clearable
  731. v-model="similarProductData.url_number"
  732. style="width: 120px"
  733. />
  734. </FormItem>
  735. <Button
  736. type="primary"
  737. style="margin: 0 10px"
  738. @click="handleSimilarProductSearch"
  739. >搜索</Button
  740. >
  741. </Form>
  742. <Table
  743. :columns="similarProductColunms"
  744. border
  745. highlight-row
  746. :disabled-hover="true"
  747. @on-current-change="handleSimilarProductSelected"
  748. :loading="similarProductLoading"
  749. :data="similarProductData.similarProductList"
  750. >
  751. </Table>
  752. <div class="page">
  753. <Page
  754. @on-change="changeSimilarProductPage"
  755. :current="similarProductData.page_index"
  756. show-total
  757. :total="similarProductData.total"
  758. size="small"
  759. :page_size="similarProductData.page_size"
  760. />
  761. </div>
  762. <div class="modal-footer" slot="footer">
  763. <Button
  764. style="margin-right:10px"
  765. @click="showSimilarProductModal = false"
  766. >取消</Button
  767. >
  768. <Button
  769. type="primary"
  770. @click="handleSimilarProductConfirm(tempSimilarProductData.id)"
  771. >确认</Button
  772. >
  773. </div>
  774. </el-dialog>
  775. <!-- 选择工艺路线弹窗 -->
  776. <Modal
  777. class-name="vertical-center-modal"
  778. v-model="showProcessLineModal"
  779. title="选择工艺路线"
  780. >
  781. <div class="modal_process_route">
  782. <div class="modal_process_route_top">
  783. <div>
  784. <span>工艺路线名称:</span>
  785. <Input
  786. v-model="tempProcessLine.title"
  787. style="width: 120px"
  788. placeholder="请输入"
  789. />
  790. </div>
  791. <Button
  792. type="primary"
  793. @click="handleSearchProcessLine(tempProcessLine.title)"
  794. >搜索</Button
  795. >
  796. </div>
  797. <div class="modal_process_route_content">
  798. <Table
  799. border
  800. :columns="processLineColumns"
  801. :data="processLineTableData"
  802. >
  803. <template slot="processLineSet" slot-scope="{ row, index }">
  804. <a style="margin: 0 5px" @click="handleProcessLineSet(row, index)"
  805. >选择</a
  806. >
  807. </template>
  808. </Table>
  809. </div>
  810. </div>
  811. </Modal>
  812. <Modal
  813. class-name="vertical-center-modal vertical-center-modal1"
  814. v-model="showProcessLineDetailModal"
  815. width="80%"
  816. :mask-closable="false"
  817. title="工艺路线"
  818. >
  819. <div class="modal_process_route modal_process_route1">
  820. <div>
  821. <span style="width: 100px">id: </span
  822. ><Input
  823. v-model="info.id"
  824. disabled
  825. placeholder="自动生成"
  826. style="width: 150px"
  827. size="small"
  828. />
  829. </div>
  830. <div>
  831. <span style="width: 100px">工艺路线名称: </span
  832. ><Input
  833. v-model="info.title"
  834. placeholder="请输入工艺路线名称"
  835. size="small"
  836. style="width: 250px"
  837. />
  838. </div>
  839. </div>
  840. <div class="modal_content">
  841. <div class="modal_content_left">
  842. <span>已选:</span>
  843. <SlickList
  844. :distance="10"
  845. :lockToContainerEdges="true"
  846. axis="x,y,xy"
  847. lockAxis="xy"
  848. v-model="selectTags"
  849. class="SortableList"
  850. @input="getChangeLists"
  851. >
  852. <SlickItem
  853. style="z-index: 9999"
  854. v-for="(item, key) of selectTags"
  855. :key="key"
  856. class="SortableItem"
  857. :index="key"
  858. >
  859. <Tooltip>
  860. <div slot="content">
  861. <p>工时:{{ item.time }}</p>
  862. <p>工价:{{ item.wages }}</p>
  863. <p>产能:{{ item.capacity }}</p>
  864. </div>
  865. <div class="tag-modal">
  866. <div class="before">{{ key + 1 }}</div>
  867. <Tag
  868. @on-close="closeTag(key, selectTags, item)"
  869. color="primary"
  870. type="border"
  871. closable
  872. >{{ item.title }}</Tag
  873. >
  874. </div>
  875. </Tooltip>
  876. </SlickItem>
  877. </SlickList>
  878. </div>
  879. <div class="modal_content_right">
  880. <div v-for="(item, index) of info.bps" :key="index">
  881. <div v-if="item.cld && item.cld.length > 0">
  882. <span style="font-weight:bold">{{ item.title }}</span>
  883. <div
  884. style="display: flex;justify-content: flex-start;flex-wrap: wrap;"
  885. >
  886. <div
  887. v-for="(_item, _index) in item.cld"
  888. :key="_index"
  889. :style="
  890. _item.p_id
  891. ? [{ 'margin-left': '10px' }]
  892. : [{ 'margin-left': '10px' }, { width: '100%' }]
  893. "
  894. >
  895. <div v-if="_item.cld && _item.cld.length > 0">
  896. <div>
  897. <div style="font-weight:bold;width:100%">
  898. {{ _item.title }}:
  899. </div>
  900. <div
  901. style="display: flex;justify-content: flex-start;flex-wrap: wrap;"
  902. >
  903. <div
  904. v-for="(__item, __index) in _item.cld"
  905. :key="__index"
  906. :style="
  907. __item.p_id
  908. ? [{ 'margin-left': '10px' }]
  909. : [{ 'margin-left': '10px' }, { width: '100%' }]
  910. "
  911. >
  912. <div v-if="__item.cld && __item.cld.length > 0">
  913. <span style="font-weight:bold"
  914. >{{ __item.title }}:</span
  915. >
  916. <div
  917. style="display: flex;justify-content: flex-start;flex-wrap: wrap;"
  918. >
  919. <Tooltip
  920. v-for="(___item, ___index) of __item.cld"
  921. :key="___index"
  922. >
  923. <div slot="content">
  924. <p>工时:{{ ___item.time }}</p>
  925. <p>工价:{{ ___item.wages }}</p>
  926. <p>产能:{{ ___item.capacity }}</p>
  927. </div>
  928. <Checkbox
  929. @on-change="
  930. changeCheck($event, ___item, selectTags)
  931. "
  932. v-model="___item.show"
  933. style="padding: 0px 5px"
  934. >{{ ___item.title }}</Checkbox
  935. >
  936. </Tooltip>
  937. </div>
  938. </div>
  939. <div v-else>
  940. <Tooltip v-if="__item.p_id">
  941. <div slot="content">
  942. <p>工时:{{ __item.time }}</p>
  943. <p>工价:{{ __item.wages }}</p>
  944. <p>产能:{{ __item.capacity }}</p>
  945. </div>
  946. <Checkbox
  947. @on-change="
  948. changeCheck($event, __item, selectTags)
  949. "
  950. v-model="__item.show"
  951. style="padding: 0px 5px"
  952. >{{ __item.title }}</Checkbox
  953. >
  954. </Tooltip>
  955. </div>
  956. </div>
  957. </div>
  958. </div>
  959. </div>
  960. <div v-else>
  961. <Tooltip v-if="_item.p_id">
  962. <div slot="content">
  963. <p>工时:{{ _item.time }}</p>
  964. <p>工价:{{ _item.wages }}</p>
  965. <p>产能:{{ _item.capacity }}</p>
  966. </div>
  967. <Checkbox
  968. @on-change="changeCheck($event, _item, selectTags)"
  969. v-model="_item.show"
  970. style="padding: 0px 5px"
  971. >{{ _item.title }}</Checkbox
  972. >
  973. </Tooltip>
  974. <!-- <span v-else>{{ _item.title }}</span> -->
  975. </div>
  976. </div>
  977. </div>
  978. </div>
  979. <!-- <div v-else>{{ item.title }}</div> -->
  980. </div>
  981. </div>
  982. </div>
  983. <div slot="footer">
  984. <Button
  985. @click="
  986. showProcessLineDetailModal = false;
  987. showProcessLineModal = true;
  988. "
  989. type="primary"
  990. ghost
  991. >取消</Button
  992. >
  993. <Button @click="saveTableData()" type="primary">确定</Button>
  994. </div>
  995. </Modal>
  996. <!-- 输入框弹窗 -->
  997. <Modal
  998. v-model="showKey"
  999. :width="1250"
  1000. :mask-closable="false"
  1001. :closable="false"
  1002. >
  1003. <div>
  1004. <KeyBoard
  1005. :rightData="measureList"
  1006. :showValue="KeyBoardValue"
  1007. @cancel="cancelKey"
  1008. @success="successKey"
  1009. class="key-co"
  1010. />
  1011. </div>
  1012. <div slot="footer"></div>
  1013. </Modal>
  1014. </div>
  1015. </template>
  1016. <script>
  1017. // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  1018. // 例如:import 《组件名称》 from '《组件路径》';
  1019. import { SlickList, SlickItem } from "vue-slicksort";
  1020. import KeyBoard from "../../../components/keyboard/index";
  1021. import Downtree from "../../../components/drowDown/index";
  1022. export default {
  1023. name: "BidSystemProductDeOrderDeorderdetail",
  1024. components: {
  1025. SlickList,
  1026. SlickItem,
  1027. KeyBoard,
  1028. Downtree,
  1029. },
  1030. props: {},
  1031. // import引入的组件需要注入到对象中才能使用
  1032. data() {
  1033. // 这里存放数据
  1034. return {
  1035. modal_show:false,
  1036. // 1拆单 2详情
  1037. type: this.$route.query.type,
  1038. formData: {
  1039. title: "", //产品名称
  1040. num: "", //数量
  1041. // price: "", //价格
  1042. measure: "", //规格
  1043. process_property: "", //工艺属性
  1044. url: [], //图纸
  1045. url_number: "", //图号
  1046. remark: "", //备注
  1047. parts: [
  1048. //产品列表
  1049. {
  1050. isAddPart: true, //是否为新增部件
  1051. long: "",
  1052. width: "",
  1053. thick: "",
  1054. parts_type: "", //部件分类名称
  1055. pay_state: "", //标签
  1056. part_id: "", //部件名称
  1057. company: "", //单位
  1058. processCombination: "", //工艺组合名称
  1059. process_price: "", //工艺价格
  1060. proportion: "", //产值比例
  1061. properties: [], //工艺属性
  1062. ProcessAttrList: [
  1063. {
  1064. id: "",
  1065. cld: [{ id: "", title: "" }],
  1066. },
  1067. ], //工艺属性列表
  1068. partsProcessLineTableData: [
  1069. // {
  1070. // id: '',
  1071. // type: '',
  1072. // title: '',
  1073. // time: '',
  1074. // wages: '',
  1075. // capacity: '',
  1076. // }
  1077. ], //工艺路线表格
  1078. partsWoodTableData: [
  1079. {
  1080. title: "",
  1081. spare_parts: "",
  1082. number: "",
  1083. company: "",
  1084. long: "",
  1085. wool_long: "",
  1086. wide: "",
  1087. wool_wide: "",
  1088. thick: "",
  1089. technological_requirement_id: "",
  1090. sub_num: "",
  1091. veneer_id: "",
  1092. paint_id: "",
  1093. label: "",
  1094. print_num: "",
  1095. },
  1096. ], //木板表格
  1097. partsMetalseData: [], //五金表格
  1098. partsNameList: [{ id: "", title: "" }], //部件名称列表
  1099. partsProcessRouteList: [{ id: "", title: "" }], //工艺组合名称列表
  1100. checkBox: [],
  1101. },
  1102. ],
  1103. },
  1104. tempProcessLine: {
  1105. title: "",
  1106. },
  1107. processLineTableData: [],
  1108. processRouteId: "",
  1109. processRouteName: "",
  1110. partsProcessLineColumns: [
  1111. { title: "序号", type: "index", minWidth: 30, align: "center" },
  1112. { title: "工序名称", key: "title", align: "center" },
  1113. { title: "工时", key: "time", align: "center", slot: "timeSlot" },
  1114. { title: "工价", key: "wages", align: "center", slot: "wagesSlot" },
  1115. {
  1116. title: "产能",
  1117. key: "capacity",
  1118. align: "center",
  1119. slot: "capacitySlot",
  1120. },
  1121. ], //工艺路线表头
  1122. partsPartColumns: [
  1123. {
  1124. title: "名称",
  1125. key: "spare_parts",
  1126. align: "center",
  1127. minWidth: 120,
  1128. slot: "partNameSet",
  1129. },
  1130. {
  1131. title: "木板",
  1132. key: "title",
  1133. align: "center",
  1134. minWidth: 120,
  1135. slot: "partSpare_partsSet",
  1136. },
  1137. {
  1138. title: "数量",
  1139. key: "number",
  1140. align: "center",
  1141. minWidth: 100,
  1142. slot: "partNumberSet",
  1143. },
  1144. { title: "单位", key: "company", align: "center", minWidth: 80 },
  1145. {
  1146. title: "行号",
  1147. align: "center",
  1148. minWidth: 100,
  1149. slot: "sortSet",
  1150. },
  1151. {
  1152. title: "合并行号",
  1153. align: "center",
  1154. minWidth: 120,
  1155. slot: "rowSet",
  1156. },
  1157. {
  1158. title: "毛料高",
  1159. key: "wool_long",
  1160. align: "center",
  1161. minWidth: 180,
  1162. slot: "partWoolLongSet",
  1163. },
  1164. {
  1165. title: "毛料宽",
  1166. key: "wool_wide",
  1167. align: "center",
  1168. minWidth: 180,
  1169. slot: "partWoolWideSet",
  1170. },
  1171. {
  1172. title: "精裁高",
  1173. key: "long",
  1174. align: "center",
  1175. minWidth: 180,
  1176. slot: "partLongSet",
  1177. },
  1178. {
  1179. title: "精裁宽",
  1180. key: "wide",
  1181. align: "center",
  1182. minWidth: 180,
  1183. slot: "partWideSet",
  1184. },
  1185. { title: "厚", key: "thick", align: "center", minWidth: 120 },
  1186. {
  1187. title: "工艺要求",
  1188. key: "technological_requirement_id",
  1189. align: "center",
  1190. minWidth: 140,
  1191. slot: "partRequirementSet",
  1192. },
  1193. {
  1194. title: "贴面数",
  1195. key: "sub_num",
  1196. align: "center",
  1197. minWidth: 120,
  1198. slot: "partSub_numSet",
  1199. },
  1200. {
  1201. title: "贴木皮名称",
  1202. key: "veneer_id",
  1203. align: "center",
  1204. minWidth: 140,
  1205. slot: "partVeneer_idSet",
  1206. },
  1207. {
  1208. title: "油漆组合",
  1209. key: "paint_id",
  1210. align: "center",
  1211. minWidth: 140,
  1212. slot: "partPaint_idSet",
  1213. },
  1214. {
  1215. title: "标签",
  1216. key: "label",
  1217. align: "center",
  1218. minWidth: 120,
  1219. slot: "partLabelSet",
  1220. },
  1221. {
  1222. title: "打印数量",
  1223. key: "print_num",
  1224. align: "center",
  1225. minWidth: 100,
  1226. slot: "partPrint_numSet",
  1227. },
  1228. {
  1229. title: "操作",
  1230. key: "name",
  1231. align: "center",
  1232. slot: "partSet",
  1233. fixed: "right",
  1234. minWidth: 140,
  1235. },
  1236. ], //零部件表头
  1237. processLineColumns: [
  1238. { title: "ID", align: "center", key: "id" },
  1239. { title: "工艺路线名称", align: "center", key: "title" },
  1240. { title: "操作", align: "center", key: "id", slot: "processLineSet" },
  1241. ],
  1242. partsMetalseColunms: [
  1243. {
  1244. title: "五金",
  1245. key: "material_id",
  1246. align: "center",
  1247. minWidth: 80,
  1248. slot: "metalSpare_partsSet",
  1249. },
  1250. {
  1251. title: "数量",
  1252. key: "number",
  1253. align: "center",
  1254. minWidth: 80,
  1255. slot: "metalNumberSet",
  1256. },
  1257. { title: "单位", key: "company", align: "center", minWidth: 80 },
  1258. {
  1259. title: "单价",
  1260. key: "price",
  1261. align: "center",
  1262. minWidth: 80,
  1263. slot: "metalPriceSet",
  1264. },
  1265. {
  1266. title: "总价",
  1267. key: "total_price",
  1268. align: "center",
  1269. minWidth: 80,
  1270. slot: "metalTotal_priceSet",
  1271. },
  1272. {
  1273. title: "操作",
  1274. key: "name",
  1275. align: "center",
  1276. minWidth: 80,
  1277. slot: "metalsSet",
  1278. },
  1279. ], //五金表头
  1280. showSimilarProductModal: false,
  1281. similarProductLoading: false,
  1282. PDTTypeList: [{ id: "", title: "" }], //产品分类列表
  1283. ProcessAttrList: [], //工艺属性列表
  1284. partsList: [], //部件分类名称列表
  1285. similarProductData: {
  1286. type_id: "",
  1287. title: "",
  1288. model: "",
  1289. url_number: "",
  1290. similarProductList: [
  1291. {
  1292. type: "",
  1293. title: "",
  1294. model: "",
  1295. url_number: "",
  1296. },
  1297. ],
  1298. page_index: 1,
  1299. page_size: 10,
  1300. total: 0,
  1301. },
  1302. similarProductColunms: [
  1303. {
  1304. title: "选择",
  1305. key: "",
  1306. align: "center",
  1307. minWidth: 60,
  1308. render: (h, params) => {
  1309. let id = params.row.id;
  1310. let flag = false;
  1311. if (this.tempSimilarProductData.id == id) {
  1312. flag = true;
  1313. } else {
  1314. flag = false;
  1315. }
  1316. let self = this;
  1317. return h("div", [
  1318. h("Radio", {
  1319. props: {
  1320. value: flag,
  1321. },
  1322. on: {
  1323. "on-change": () => {
  1324. self.tempSimilarProductData = params.row;
  1325. },
  1326. },
  1327. }),
  1328. ]);
  1329. },
  1330. },
  1331. { title: "产品分类", key: "type_name", align: "center", minWidth: 80 },
  1332. { title: "产品名称", key: "title", align: "center", minWidth: 80 },
  1333. { title: "产品型号", key: "model", align: "center", minWidth: 80 },
  1334. { title: "图号", key: "url_number", align: "center", minWidth: 80 },
  1335. ],
  1336. processLineData: {
  1337. title: "",
  1338. processLineList: [
  1339. {
  1340. id: "",
  1341. title: "",
  1342. },
  1343. ],
  1344. page_index: 1,
  1345. page_size: 10,
  1346. total: 0,
  1347. },
  1348. processLineColunms: [
  1349. { title: "ID", key: "name", align: "center", minWidth: 80 },
  1350. { title: "工艺路线名称", key: "name", align: "center", minWidth: 80 },
  1351. {
  1352. title: "操作",
  1353. key: "name",
  1354. align: "center",
  1355. minWidth: 80,
  1356. slot: "processLineSet",
  1357. },
  1358. ],
  1359. showProcessLineModal: false,
  1360. showProcessLineDetailModal: false,
  1361. showKey: false,
  1362. processLineLoading: false,
  1363. tempSimilarProductData: {},
  1364. tempProcessLineData: {},
  1365. order_no: this.$route.query.order_no,
  1366. orders_area_product_detail_id: this.$route.query
  1367. .orders_area_product_detail_id,
  1368. oa_id: this.$route.query.oa_id,
  1369. selectTags: [], //已选列表
  1370. info: {
  1371. title: "",
  1372. price: "",
  1373. parts_id: "",
  1374. id: null,
  1375. properties: [], //工序号
  1376. procedure: [], //工艺属性id
  1377. ProcessAttrList: [],
  1378. bps: [],
  1379. },
  1380. tempSelectedPartIndex: 0,
  1381. // 工艺属性暂存
  1382. tempProcessAttrList: [],
  1383. // 输入框弹窗
  1384. measureList: [
  1385. // { e_title: 'H', title: '高', id: 1, sort: 0 },
  1386. // { e_title: 'W', title: '宽', id: 1, sort: 0 },
  1387. // { e_title: 'D', title: '深', id: 1, sort: 0 },
  1388. ],
  1389. KeyBoardValue: "",
  1390. attrIndex: "",
  1391. attrName: "",
  1392. materialWoodList: [], // 木板列表
  1393. processRequireList: [], // 工艺要求列表
  1394. materialWoodSkinList: [], // 木皮列表
  1395. materialPaintList: [], // 油漆列表
  1396. metalsList: [], // 五金列表
  1397. productTypes: [],
  1398. nowSelectObj: {},
  1399. temp_info_bps: [],
  1400. process_name: "",
  1401. // 判断工艺路线是否新增
  1402. isNewProcess: false,
  1403. };
  1404. },
  1405. // 生命周期 - 创建完成(可以访问当前this实例)
  1406. created() {
  1407. // 获取产品分类
  1408. this.axios("/api/parts_product_list").then((res) => {
  1409. this.productTypes = res.data;
  1410. });
  1411. this.axios("/api/bp_list").then((res) => {
  1412. this.info.bps = res.data;
  1413. for (const key in this.info.bps) {
  1414. const element = this.info.bps[key];
  1415. element.cld &&
  1416. element.cld.length > 0 &&
  1417. element.cld.forEach((z) => {
  1418. z.show = false;
  1419. z.cld &&
  1420. z.cld.length > 0 &&
  1421. z.cld.forEach((elem) => {
  1422. elem.show = false;
  1423. elem.cld &&
  1424. elem.cld.length > 0 &&
  1425. elem.cld.forEach((el) => {
  1426. el.show = false;
  1427. });
  1428. });
  1429. });
  1430. }
  1431. this.temp_info_bps = JSON.parse(JSON.stringify(this.info.bps));
  1432. });
  1433. this.axios("/api/bpp_list_new").then((res) => {
  1434. // res.data.map((v) => {
  1435. // if (v.select) {
  1436. // v.cld.map((z) => {
  1437. // v.select.map((k) => {
  1438. // z.show = k == z.id ? true : false;
  1439. // });
  1440. // });
  1441. // } else {
  1442. // v.cld.map((v) => (v.show = false));
  1443. // }
  1444. // });
  1445. this.tempProcessAttrList = JSON.parse(JSON.stringify(res.data));
  1446. this.formData.parts.forEach((element) => {
  1447. element.ProcessAttrList = JSON.parse(JSON.stringify(res.data));
  1448. });
  1449. });
  1450. },
  1451. // 生命周期 - 挂载完成(可以访问DOM元素)
  1452. mounted() {
  1453. // 获取产品分类列表
  1454. this.axios("/api/parts_product_list").then((res) => {
  1455. this.PDTTypeList = res.data;
  1456. });
  1457. // 获取工艺要求列表
  1458. this.axios("/api/technological_requirement").then((res) => {
  1459. this.processRequireList = res.data.data;
  1460. });
  1461. // 获取贴木皮列表
  1462. this.axios("/api/material", { params: { sub_type_id: 2 } }).then((res) => {
  1463. this.materialWoodSkinList = res.data.data;
  1464. });
  1465. // 获取油漆列表
  1466. this.axios("/api/material_combination").then((res) => {
  1467. this.materialPaintList = res.data.data;
  1468. });
  1469. // 获取五金列表
  1470. this.axios("/api/material", { params: { sub_type_id: 5 } }).then((res) => {
  1471. this.metalsList = res.data.data;
  1472. });
  1473. // 获取部件分类列表
  1474. this.axios("/api/basics_parts_index").then((res) => {
  1475. this.partsList = res.data.data;
  1476. });
  1477. // 获取木板列表
  1478. this.axios("/api/material", { params: { sub_type_id: 1 } }).then((res) => {
  1479. this.materialWoodList = res.data.data;
  1480. });
  1481. this.initData(
  1482. this.order_no,
  1483. this.orders_area_product_detail_id,
  1484. this.oa_id
  1485. );
  1486. },
  1487. methods: {
  1488. initData(order_no, orders_area_product_detail_id, oa_id) {
  1489. this.axios({
  1490. method: "get",
  1491. url: "/api/order_area_explode_detail",
  1492. params: {
  1493. order_no,
  1494. orders_area_product_detail_id,
  1495. oa_id,
  1496. },
  1497. }).then((res) => {
  1498. this.formData = res.data;
  1499. // this.formData.basic_product_id = 8;
  1500. // 获取产品分类、测量字段
  1501. this.handleMatchBP(this.productTypes, this.formData.basic_product_id);
  1502. this.handleClick(JSON.stringify(this.nowSelectObj));
  1503. if (this.formData.parts.length == 0) {
  1504. this.formData.parts = [
  1505. {
  1506. isAddPart: true, //是否为新增部件
  1507. long: "",
  1508. wide: "",
  1509. thick: "",
  1510. parts_type: "", //部件分类名称
  1511. pay_state: "", //标签
  1512. part_id: "", //部件名称
  1513. company: "", //单位
  1514. processCombination: "", //工艺组合名称
  1515. process_price: "", //工艺价格
  1516. proportion: "", //产值比例
  1517. properties: [], //工艺属性
  1518. isShowProcessLine: true, //是否展示工艺路线
  1519. ProcessAttrList: JSON.parse(
  1520. JSON.stringify(this.tempProcessAttrList)
  1521. ), //工艺属性列表
  1522. partsProcessLineTableData: [], //工艺路线表格
  1523. partsWoodTableData: [
  1524. {
  1525. title: "",
  1526. spare_parts: "",
  1527. number: "",
  1528. company: "",
  1529. long: "",
  1530. wool_long: "",
  1531. wide: "",
  1532. wool_wide: "",
  1533. thick: "",
  1534. technological_requirement_id: "",
  1535. sub_num: "",
  1536. veneer_id: "",
  1537. paint_id: "",
  1538. label: "",
  1539. print_num: "",
  1540. },
  1541. ], //木板表格
  1542. partsMetalseData: [], //五金表格
  1543. partsNameList: [{ id: "", title: "" }], //部件名称列表
  1544. partsProcessRouteList: [{ id: "", title: "" }], //工艺组合名称列表
  1545. checkBox: [],
  1546. },
  1547. ];
  1548. } else {
  1549. this.handleSimilarProductConfirm(
  1550. res.data.product_id,
  1551. this.formData,
  1552. res
  1553. );
  1554. }
  1555. });
  1556. },
  1557. handleMatchBP(array, id) {
  1558. array.forEach((element, index) => {
  1559. if (element.id != id) {
  1560. if (element.child && element.child.length > 0) {
  1561. return this.handleMatchBP(element.child, id);
  1562. }
  1563. } else {
  1564. this.nowSelectObj = element;
  1565. }
  1566. });
  1567. },
  1568. getChangeLists(e) {},
  1569. saveTableData(row, index) {
  1570. if (this.isNewProcess) {
  1571. let temparr = [];
  1572. this.selectTags.forEach((el) => {
  1573. temparr.push(el.id);
  1574. });
  1575. this.axios({
  1576. method: "post",
  1577. url: "/api/technological_route_edit",
  1578. data: {
  1579. id: "",
  1580. title: this.info.title,
  1581. procedure_id: temparr.join(","),
  1582. },
  1583. }).then((res) => {
  1584. if (res.code == 200) {
  1585. this.formData.parts[
  1586. this.tempSelectedPartIndex
  1587. ].partsProcessLineTableData = [];
  1588. this.formData.parts[
  1589. this.tempSelectedPartIndex
  1590. ].partsProcessLineTableData = this.formData.parts[
  1591. this.tempSelectedPartIndex
  1592. ].partsProcessLineTableData.concat(this.selectTags);
  1593. this.showProcessLineDetailModal = false;
  1594. this.formData.parts[
  1595. this.tempSelectedPartIndex
  1596. ].process_name = this.info.title;
  1597. }
  1598. });
  1599. } else {
  1600. this.formData.parts[
  1601. this.tempSelectedPartIndex
  1602. ].partsProcessLineTableData = [];
  1603. this.formData.parts[
  1604. this.tempSelectedPartIndex
  1605. ].partsProcessLineTableData = this.formData.parts[
  1606. this.tempSelectedPartIndex
  1607. ].partsProcessLineTableData.concat(this.selectTags);
  1608. this.showProcessLineDetailModal = false;
  1609. this.formData.parts[
  1610. this.tempSelectedPartIndex
  1611. ].process_name = this.info.title;
  1612. }
  1613. },
  1614. // 删除工艺路线列表项
  1615. handleProcessLineDele(row, i, index) {
  1616. let formData = JSON.parse(JSON.stringify(this.formData));
  1617. formData.parts[index].partsProcessLineTableData.splice(i, 1);
  1618. this.formData = formData;
  1619. },
  1620. //选择相似产品
  1621. handleSimilarProductShow() {
  1622. this.showSimilarProductModal = true;
  1623. this.similarProductLoading = true;
  1624. this.similarProductData.type_id = "";
  1625. this.similarProductData.title = "";
  1626. this.similarProductData.model = "";
  1627. this.similarProductData.url_number = "";
  1628. this.axios("/api/product", {
  1629. params: {
  1630. type_id: this.similarProductData.type_id,
  1631. title: this.similarProductData.title,
  1632. model: this.similarProductData.model,
  1633. url_number: this.similarProductData.url_number,
  1634. page_size: this.similarProductData.page_size,
  1635. page_index: this.similarProductData.page_index,
  1636. },
  1637. }).then((res) => {
  1638. this.similarProductLoading = false;
  1639. this.similarProductData.similarProductList = res.data.data;
  1640. this.similarProductData.total = res.data.total;
  1641. });
  1642. },
  1643. changeSimilarProductPage(e) {
  1644. this.similarProductLoading = true;
  1645. this.axios("/api/product", {
  1646. params: {
  1647. type_name: this.similarProductData.type_name,
  1648. title: this.similarProductData.title,
  1649. model: this.similarProductData.model,
  1650. url_number: this.similarProductData.url_number,
  1651. page_size: this.similarProductData.page_size,
  1652. page_index: e,
  1653. },
  1654. }).then((res) => {
  1655. this.similarProductLoading = false;
  1656. this.similarProductData.similarProductList = res.data.data;
  1657. this.similarProductData.similarProductList.forEach((el) => {
  1658. el.selected = false;
  1659. });
  1660. this.similarProductData.total = res.data.total;
  1661. });
  1662. },
  1663. handleSimilarProductSearch() {
  1664. this.similarProductLoading = true;
  1665. this.axios("/api/product", {
  1666. params: {
  1667. type_id: this.similarProductData.type_id,
  1668. title: this.similarProductData.title,
  1669. model: this.similarProductData.model,
  1670. url_number: this.similarProductData.url_number,
  1671. page_size: this.similarProductData.page_size,
  1672. page_index: this.similarProductData.page_index,
  1673. },
  1674. }).then((res) => {
  1675. this.similarProductLoading = false;
  1676. this.similarProductData.similarProductList = res.data.data;
  1677. this.similarProductData.similarProductList.forEach((el) => {
  1678. el.selected = false;
  1679. });
  1680. this.similarProductData.total = res.data.total;
  1681. });
  1682. },
  1683. // 产值比校验
  1684. handleProportionEdit(e, row, index) {
  1685. // e.target.value
  1686. },
  1687. handleSimilarProductSelected(row, oldrow) {
  1688. this.tempSimilarProductData = row;
  1689. },
  1690. handleSimilarProductConfirm(id, isEditItem, result) {
  1691. if (id) {
  1692. this.axios({
  1693. method: "get",
  1694. url: "/api/product",
  1695. params: {
  1696. id,
  1697. },
  1698. }).then((res) => {
  1699. if (res.code == 200) {
  1700. res.data.part.forEach((element, index) => {
  1701. element.part_title = element.title;
  1702. this.formData.parts.forEach((ele, idx) => {
  1703. if (element.part_id == ele.part_id) {
  1704. element.process_ids = ele.process_ids;
  1705. element.route_id = ele.route_id;
  1706. element.produce_list = ele.produce_list;
  1707. element.process_list = ele.process_list;
  1708. if (isEditItem) {
  1709. const temp_arr = isEditItem.parts.filter(
  1710. (v) => v.part_id == element.part_id
  1711. );
  1712. element.long = temp_arr[temp_arr.length - 1].long;
  1713. element.wide = temp_arr[temp_arr.length - 1].wide;
  1714. element.thick = temp_arr[temp_arr.length - 1].thick;
  1715. element.detail = temp_arr[temp_arr.length - 1].detail;
  1716. }
  1717. }
  1718. });
  1719. });
  1720. this.formData.parts = res.data.part;
  1721. //label
  1722. // this.formData.title = res.data.title;
  1723. // this.formData.unit = res.data.unit;
  1724. // this.formData.remark = res.data.remark;
  1725. // this.formData.url = res.data.url;
  1726. // this.formData.url_number = res.data.url_number;
  1727. // this.formData.measure = res.data.measure_id
  1728. // if (isEditItem) {
  1729. // res.data.part.forEach((element, index) => {
  1730. // Object.assign(element, this.formData.parts[index]);
  1731. // });
  1732. // }
  1733. this.formData.parts.map((element, index) => {
  1734. element.partsProcessLineTableData = [];
  1735. element.proportion = element.ratio;
  1736. element.isShowProcessLine = true;
  1737. element.ProcessAttrList = JSON.parse(
  1738. JSON.stringify(this.tempProcessAttrList)
  1739. ); //工艺属性列表
  1740. let obj = { value: element.part_id, title: element.title };
  1741. if (!isEditItem) {
  1742. element.thick = element.formula_h;
  1743. element.wide = element.formula_w;
  1744. element.long = element.formula_l;
  1745. }
  1746. this.handlePartsNameSelect_test(element, obj, index, result);
  1747. });
  1748. if (isEditItem) {
  1749. let item = isEditItem;
  1750. // let item = JSON.parse(JSON.stringify(isEditItem));
  1751. item.parts.forEach((it) => {
  1752. it.processCombination = it.route_id;
  1753. let obj = { value: it.route_id, label: "" };
  1754. this.handleProcessRouteSelect(it, obj);
  1755. });
  1756. isEditItem = item;
  1757. }
  1758. }
  1759. });
  1760. } else {
  1761. this.showSimilarProductModal = false;
  1762. }
  1763. },
  1764. //选择部件分类名称
  1765. handlePartsSelect(e, item) {
  1766. this.axios({
  1767. method: "get",
  1768. url: "/api/parts_index",
  1769. params: {
  1770. bp_id: e,
  1771. },
  1772. })
  1773. .then((res) => {
  1774. this.$nextTick(() => {
  1775. item.part_id = "";
  1776. item.partsNameList = res.data.data;
  1777. this.$forceUpdate();
  1778. });
  1779. })
  1780. .catch((err) => {});
  1781. },
  1782. //新增部件名称
  1783. handlePartTitleCreate(item, val) {
  1784. item.partsNameList.push({
  1785. id: val,
  1786. title: val,
  1787. });
  1788. this.$forceUpdate();
  1789. },
  1790. // 部件名称
  1791. handlePartsNameSelect(item, val) {
  1792. if (val && val.value) {
  1793. item.part_title = val.label;
  1794. if (val.label != val.value) {
  1795. this.axios({
  1796. method: "get",
  1797. url: "/api/parts_detail",
  1798. params: {
  1799. id: val.value,
  1800. },
  1801. }).then((res) => {
  1802. item.pay_state = res.data.label;
  1803. item.company = res.data.company;
  1804. item.ProcessAttrList = JSON.parse(
  1805. JSON.stringify(this.tempProcessAttrList)
  1806. );
  1807. item.partsWoodTableData ? "" : (item.partsWoodTableData = []);
  1808. item.partsMetalseData ? "" : (item.partsMetalseData = []);
  1809. item.partsWoodTableData = res.data.detail.filter(
  1810. (v) => v.type_id == 1 || v.type_id == 2
  1811. );
  1812. item.partsWoodTableData.map((v) => {
  1813. v.wool_long = "";
  1814. v.wool_wide = "";
  1815. });
  1816. item.partsMetalseData = res.data.detail.filter(
  1817. (v) => v.type_id == 5
  1818. );
  1819. });
  1820. } else {
  1821. // item.isAddPart = true;
  1822. // item.ProcessAttrList = this.tempProcessAttrList;
  1823. // item.partsWoodTableData = [];
  1824. // item.partsMetalseData = [];
  1825. // item.process_name = "";
  1826. }
  1827. }
  1828. },
  1829. handlePartsNameSelect_test(item, val, index, result) {
  1830. if (val && val.value) {
  1831. if (val.label != val.value) {
  1832. this.axios({
  1833. method: "get",
  1834. url: "/api/parts_detail",
  1835. params: {
  1836. id: val.value,
  1837. },
  1838. }).then((res) => {
  1839. item.pay_state = res.data.label;
  1840. item.company = res.data.company;
  1841. item.ProcessAttrList = JSON.parse(
  1842. JSON.stringify(this.tempProcessAttrList)
  1843. );
  1844. item.partsWoodTableData ? "" : (item.partsWoodTableData = []);
  1845. item.partsMetalseData ? "" : (item.partsMetalseData = []);
  1846. item.partsWoodTableData = res.data.detail.filter(
  1847. (v) => v.type_id == 1 || v.type_id == 2
  1848. );
  1849. item.partsWoodTableData.length > 0 &&
  1850. item.partsWoodTableData.map((v, k) => {
  1851. const temp_arr = res.data.detail.filter((w) => w.id == v.id);
  1852. v.wool_long = "";
  1853. v.wool_wide = "";
  1854. if (temp_arr.length > 0) {
  1855. v.long = temp_arr[temp_arr.length - 1].long;
  1856. v.wool_long = temp_arr[temp_arr.length - 1].wool_long;
  1857. v.wide = temp_arr[temp_arr.length - 1].wide;
  1858. v.wool_wide = temp_arr[temp_arr.length - 1].wool_wide;
  1859. }
  1860. if (result) {
  1861. if (result.data.parts[index].detail) {
  1862. v.long = result.data.parts[index].detail[k].long;
  1863. v.wide = result.data.parts[index].detail[k].wide;
  1864. v.wool_long = result.data.parts[index].detail[k].wool_long;
  1865. v.wool_wide = result.data.parts[index].detail[k].wool_wide;
  1866. v.row = result.data.parts[index].detail[k].row;
  1867. v.sort = result.data.parts[index].detail[k].sort;
  1868. }
  1869. }
  1870. });
  1871. item.partsMetalseData = res.data.detail.filter(
  1872. (v) => v.type_id == 5
  1873. );
  1874. item.parts_type = res.data.p_id;
  1875. this.axios({
  1876. method: "get",
  1877. url: "/api/parts_index",
  1878. params: {
  1879. bp_id: item.parts_type,
  1880. },
  1881. }).then((r) => {
  1882. item.partsNameList = r.data.data;
  1883. item.part_id = res.data.id;
  1884. this.$forceUpdate();
  1885. });
  1886. item.company = res.data.company;
  1887. // item.partsNameList = [{ id: res.data.id, title: res.data.title }]
  1888. item.pay_state = res.data.label;
  1889. // item.partsWoodTableData = res.data.detail;
  1890. this.showSimilarProductModal = false;
  1891. });
  1892. } else {
  1893. // item.isAddPart = true;
  1894. // item.ProcessAttrList = this.tempProcessAttrList;
  1895. // item.partsWoodTableData = [];
  1896. // item.partsMetalseData = [];
  1897. // item.process_name = "";
  1898. }
  1899. }
  1900. },
  1901. // 选择工艺组合名称
  1902. handleProcessRouteSelect(item, val) {
  1903. if (val) {
  1904. this.axios({
  1905. method: "get",
  1906. url: "/api/process_route_detail",
  1907. params: {
  1908. id: val.value,
  1909. },
  1910. }).then((res) => {
  1911. this.info = res.data;
  1912. this.info.bps = this.temp_info_bps;
  1913. item.process_price = res.data.price;
  1914. this.selectTags = res.data.produce_list;
  1915. const selectTagsId = this.selectTags.map((item) => item.id);
  1916. item.ProcessAttrList = res.data.list;
  1917. item.process_list.map((v) => {
  1918. item.ProcessAttrList.map((c) => {
  1919. if (c.name == v.name) {
  1920. c.selected_value = v.id * 1;
  1921. }
  1922. });
  1923. });
  1924. item.process_name = res.data.technological_route_title;
  1925. item.properties = res.data.pp_id.split(","); ///存在问题
  1926. this.info.bps.forEach((v) => {
  1927. v.cld &&
  1928. v.cld.length > 0 &&
  1929. v.cld.forEach((z) => {
  1930. z.show = selectTagsId.includes(z.id);
  1931. z.cld &&
  1932. z.cld.length > 0 &&
  1933. z.cld.forEach((elem) => {
  1934. elem.show = selectTagsId.includes(elem.id);
  1935. elem.cld &&
  1936. elem.cld.length > 0 &&
  1937. elem.cld.forEach((ele) => {
  1938. ele.show = selectTagsId.includes(ele.id);
  1939. ele.cld &&
  1940. ele.cld.length > 0 &&
  1941. ele.cld.forEach((el) => {
  1942. el.show = selectTagsId.includes(el.id);
  1943. });
  1944. });
  1945. });
  1946. });
  1947. });
  1948. if (item.produce_list && item.produce_list.length > 0) {
  1949. item.produce_list.map((v) => (v.wages = v.price));
  1950. item.partsProcessLineTableData = item.produce_list;
  1951. } else {
  1952. item.partsProcessLineTableData = this.selectTags;
  1953. }
  1954. });
  1955. }
  1956. },
  1957. handleProcessSelect() {},
  1958. handleProcessLineShow(item, index) {
  1959. item.isShowProcessLine
  1960. ? (document.getElementsByClassName("parts_content_lineTable")[
  1961. index
  1962. ].style.height = "89px")
  1963. : (document.getElementsByClassName("parts_content_lineTable")[
  1964. index
  1965. ].style.height = "auto");
  1966. item.isShowProcessLine = !item.isShowProcessLine;
  1967. this.$forceUpdate();
  1968. },
  1969. //选择工艺路线
  1970. editRouter(item, index) {
  1971. // 重新打开则重新判定是否为新增工艺路线
  1972. this.isNewProcess = false;
  1973. this.showProcessLineModal = true;
  1974. this.tempSelectedPartIndex = index;
  1975. this.handleSearchProcessLine(this.tempProcessLine.title);
  1976. },
  1977. handleSearchProcessLine(title) {
  1978. this.axios({
  1979. method: "get",
  1980. url: "/api/technological_route",
  1981. params: {
  1982. title,
  1983. },
  1984. }).then((res) => {
  1985. this.processLineTableData = res.data.data;
  1986. });
  1987. },
  1988. changeCheck(e, item, selectArray) {
  1989. // 一旦更改便标记为新增工艺路线
  1990. this.isNewProcess = true;
  1991. //复选框选中与非选中同时同步tag标签跟随操作
  1992. item.show = e;
  1993. if (e) {
  1994. selectArray.push(item);
  1995. } else {
  1996. let id = item.id;
  1997. let id_index = selectArray.findIndex((v) => v.id == id);
  1998. selectArray.splice(id_index, 1);
  1999. }
  2000. },
  2001. closeTag(key, arr, row) {
  2002. //取消tag标签展示操作并同步下方的复选框ui同步
  2003. for (const key in this.info.bps) {
  2004. const element = this.info.bps[key];
  2005. element.cld.map((p) => {
  2006. p.id == row.id ? (p.show = false) : "";
  2007. p.cld &&
  2008. p.cld.length > 0 &&
  2009. p.cld.map((q) => {
  2010. q.id == row.id ? (q.show = false) : "";
  2011. q.cld &&
  2012. q.cld.length > 0 &&
  2013. q.cld.map((r) => {
  2014. r.id == row.id ? (r.show = false) : "";
  2015. r.cld &&
  2016. r.cld.length > 0 &&
  2017. r.cld.map((s) => {
  2018. s.id == row.id ? (s.show = false) : "";
  2019. });
  2020. });
  2021. });
  2022. });
  2023. }
  2024. arr.splice(key, 1);
  2025. },
  2026. setBoxChange(parent, child) {
  2027. return;
  2028. // const { type } = this.$route.query;
  2029. // if (type == 3) {
  2030. // return;
  2031. // }
  2032. // child.show = !child.show;
  2033. // child.list.forEach((element) => {
  2034. // element.show = child.show;
  2035. // });
  2036. },
  2037. setRadioChange(parent, child, index, parts, cld) {
  2038. if (this.type != 2) {
  2039. cld.forEach((element) => {
  2040. element.list.forEach((elem) => {
  2041. elem.id != child.id && (elem.show = false);
  2042. });
  2043. });
  2044. child.show = !child.show;
  2045. parts.properties[index] = child.id;
  2046. }
  2047. this.$forceUpdate();
  2048. },
  2049. // setRadioChange(parent, child) {
  2050. // const { type } = this.$route.query;
  2051. // if (type == 3) {
  2052. // return;
  2053. // }
  2054. // // let flag = true;
  2055. // parent.list.forEach((element) => {
  2056. // element.show = false
  2057. // if (!element.show) {
  2058. // // flag = false;
  2059. // }
  2060. // });
  2061. // child.show = !child.show;
  2062. // console.log('child.show :>> ', child.show);
  2063. // // parent.show = flag;
  2064. // this.$forceUpdate();
  2065. // },
  2066. handleProcessLineSet(row, index) {
  2067. this.process_name = row.title;
  2068. this.info.id = row.id;
  2069. this.info.title = row.title;
  2070. this.info.procedure_id = row.procedure_id;
  2071. this.selectTags = [];
  2072. const arr = this.info.procedure_id
  2073. ? this.info.procedure_id.split(",")
  2074. : [];
  2075. for (const key in this.info.bps) {
  2076. const el = this.info.bps[key];
  2077. el.cld.forEach((z) => {
  2078. z.show = false;
  2079. z.cld &&
  2080. z.cld.length > 0 &&
  2081. z.cld.forEach((elem) => {
  2082. elem.show = false;
  2083. elem.cld &&
  2084. elem.cld.length > 0 &&
  2085. elem.cld.forEach((ele) => {
  2086. ele.show = false;
  2087. });
  2088. });
  2089. });
  2090. }
  2091. for (let index = 0; index < arr.length; index++) {
  2092. const element = arr[index];
  2093. this.info.bps.map((lv1) => {
  2094. lv1.cld &&
  2095. lv1.cld.length > 0 &&
  2096. lv1.cld.map((lv2) => {
  2097. if (lv2.id == element) {
  2098. lv2.show = true;
  2099. lv2.p_id && this.selectTags.push(lv2);
  2100. }
  2101. lv2.cld &&
  2102. lv2.cld.length > 0 &&
  2103. lv2.cld.map((lv3) => {
  2104. if (lv3.id == element) {
  2105. lv3.show = true;
  2106. lv3.p_id && this.selectTags.push(lv3);
  2107. }
  2108. lv3.cld &&
  2109. lv3.cld.length > 0 &&
  2110. lv3.cld.map((lv4) => {
  2111. if (lv4.id == element) {
  2112. lv4.show = true;
  2113. lv4.p_id && this.selectTags.push(lv4);
  2114. }
  2115. });
  2116. });
  2117. });
  2118. });
  2119. }
  2120. this.showProcessLineDetailModal = true;
  2121. this.showProcessLineModal = false;
  2122. },
  2123. changeProcessLineSize() {},
  2124. changeProcessLinePage() {},
  2125. handleProcessLineConfirm() {},
  2126. handleProcessLineSearch() {},
  2127. handlePartAdd(item, index) {
  2128. let obj = {
  2129. isAddPart: true,
  2130. long: "",
  2131. width: "",
  2132. thick: "",
  2133. parts_type: "", //部件分类名称
  2134. pay_state: "", //标签
  2135. part_id: "", //部件名称
  2136. company: "", //单位
  2137. processCombination: "", //工艺组合名称
  2138. process_price: "", //工艺价格
  2139. ProcessAttrList: JSON.parse(JSON.stringify(this.tempProcessAttrList)), //工艺属性列表
  2140. partsProcessLineTableData: [
  2141. {
  2142. id: "",
  2143. type: "",
  2144. title: "",
  2145. time: "",
  2146. wages: "",
  2147. capacity: "",
  2148. },
  2149. ], //工艺路线表格
  2150. partsWoodTableData: [
  2151. {
  2152. title: "",
  2153. spare_parts: "",
  2154. number: "",
  2155. company: "",
  2156. long: "",
  2157. wool_long: "",
  2158. wide: "",
  2159. wool_wide: "",
  2160. thick: "",
  2161. technological_requirement_id: "",
  2162. sub_num: "",
  2163. veneer_id: "",
  2164. paint_id: "",
  2165. label: "",
  2166. print_num: "",
  2167. },
  2168. ], //零部件表格
  2169. partsMetalseData: [
  2170. {
  2171. spare_parts: "",
  2172. number: "",
  2173. company: "",
  2174. price: "",
  2175. total_price: "",
  2176. },
  2177. ], //五金表格
  2178. partsNameList: [{ id: "", title: "" }], //部件名称列表
  2179. checkBox: [],
  2180. keyUseType: 0,
  2181. };
  2182. this.formData.parts.splice(index + 1, 0, obj);
  2183. },
  2184. handlePartCopy(item, index) {
  2185. let obj = JSON.parse(JSON.stringify(item));
  2186. // this.formData.parts.splice(index, 0, obj);
  2187. this.formData.parts.push(obj);
  2188. },
  2189. handlePartDele(item, index) {
  2190. this.formData.parts.splice(index, 1);
  2191. },
  2192. handlePartWoodAdd(index) {
  2193. let formData = JSON.parse(JSON.stringify(this.formData));
  2194. formData.parts[index].partsWoodTableData.push({
  2195. type_id: 1,
  2196. title: "",
  2197. spare_parts: "",
  2198. number: "",
  2199. company: "",
  2200. long: "",
  2201. wool_long: "",
  2202. wide: "",
  2203. wool_wide: "",
  2204. thick: "",
  2205. technological_requirement_id: "",
  2206. sub_num: "",
  2207. veneer_id: "",
  2208. paint_id: "",
  2209. label: "",
  2210. print_num: "",
  2211. });
  2212. this.formData = formData;
  2213. },
  2214. handlePartWoodCopy(row, index, parentIndex) {
  2215. let obj = JSON.parse(
  2216. JSON.stringify(
  2217. this.formData.parts[parentIndex].partsWoodTableData[index]
  2218. )
  2219. );
  2220. this.formData.parts[parentIndex].partsWoodTableData.splice(
  2221. index + 1,
  2222. 0,
  2223. obj
  2224. );
  2225. // this.formData.parts[parentIndex].partsWoodTableData.push(obj)
  2226. this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
  2227. },
  2228. handlePartWoodDele(row, index, parentIndex) {
  2229. this.formData.parts[parentIndex].partsWoodTableData.splice(index, 1);
  2230. this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
  2231. },
  2232. handlePartMetalsAdd(index) {
  2233. let formData = JSON.parse(JSON.stringify(this.formData));
  2234. if (formData.parts[index].partsMetalseData == undefined) {
  2235. formData.parts[index].partsMetalseData = [];
  2236. }
  2237. formData.parts[index].partsMetalseData.push({
  2238. type_id: 2,
  2239. spare_parts: "",
  2240. number: "",
  2241. company: "",
  2242. price: "",
  2243. total_price: "",
  2244. });
  2245. this.formData = formData;
  2246. },
  2247. handlePartMetalsCopy(row, index, parentIndex) {
  2248. let obj = JSON.parse(JSON.stringify(row));
  2249. this.formData.parts[parentIndex].partsMetalseData.splice(
  2250. index + 1,
  2251. 0,
  2252. obj
  2253. );
  2254. this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
  2255. },
  2256. handleClose(done) {
  2257. done();
  2258. },
  2259. handlePartMetalsDele(row, index, parentIndex) {
  2260. this.formData.parts[parentIndex].partsMetalseData.splice(index, 1);
  2261. this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
  2262. },
  2263. handleProcessLineSelected() {},
  2264. async postData() {
  2265. let sum = 0;
  2266. this.formData.parts.forEach((element) => {
  2267. sum += element.proportion * 1;
  2268. });
  2269. // const BJ_name = this.formData.parts.map((item) => {
  2270. // return item.part_id;
  2271. // });
  2272. // const atfer_BJ_name = Array.from(new Set(BJ_name));
  2273. // if (atfer_BJ_name.length != BJ_name.length) {
  2274. // return this.$Message.error("部件名称存在重复");
  2275. // }
  2276. if (sum != 100) {
  2277. this.$Message.error("产值比之和须为100");
  2278. } else {
  2279. // 部件保存
  2280. let save_sucess = true;
  2281. for (let i in this.formData.parts) {
  2282. let element = this.formData.parts[i];
  2283. let flag = true;
  2284. // element.partsNameList.forEach((ele) => {
  2285. // if (element.part_id == ele.id && ele.id == ele.title) {
  2286. // flag = true;
  2287. // }
  2288. // });
  2289. if (flag) {
  2290. let result = await this.axios({
  2291. method: "post",
  2292. url: "/api/order_area_explode_part",
  2293. data: {
  2294. top: {
  2295. p_id: element.parts_type,
  2296. bp_id: this.nowSelectObj.id, //相似产品
  2297. company: element.company,
  2298. label: element.pay_state,
  2299. title: element.part_title,
  2300. },
  2301. op: "add",
  2302. detail: [
  2303. ...element.partsWoodTableData,
  2304. ...element.partsMetalseData,
  2305. ],
  2306. },
  2307. });
  2308. if (result.code == 200) {
  2309. element.part_id_save = result.data.id;
  2310. // 工艺路线保存 partsProcessLineTableData
  2311. let bool = true;
  2312. // element.partsProcessRouteList.forEach((ele) => {
  2313. // if (
  2314. // element.processCombination == ele.id &&
  2315. // ele.id == ele.title
  2316. // ) {
  2317. // bool = true;
  2318. // }
  2319. // });
  2320. let properties = element.ProcessAttrList.map((v) => {
  2321. return { name: v.name, value: v.selected_value || "" };
  2322. });
  2323. // element.partsProcessLineTableData.forEach(async (el, idx) => {
  2324. // if (idx == element.length - 1) {
  2325. // procedure += el.id + "";
  2326. // } else {
  2327. // procedure += el.id + ",";
  2328. // }
  2329. // });
  2330. if (bool) {
  2331. let res = await this.axios({
  2332. method: "post",
  2333. url: "/api/order_area_explode_process",
  2334. data: {
  2335. parts_id: element.part_id_save,
  2336. price: element.process_price || 0,
  2337. properties,
  2338. title: element.processCombination,
  2339. procedure: element.partsProcessLineTableData,
  2340. op: "add",
  2341. },
  2342. });
  2343. if (res.code == 200) {
  2344. element.route_id = res.data.id;
  2345. element.part_id_save = result.data.id;
  2346. } else {
  2347. return;
  2348. }
  2349. } else {
  2350. element.route_id = element.processCombination;
  2351. }
  2352. } else {
  2353. save_sucess = false;
  2354. }
  2355. } else {
  2356. // 工艺路线保存 partsProcessLineTableData
  2357. let bool = true;
  2358. // element.partsProcessRouteList.forEach((ele) => {
  2359. // if (element.processCombination == ele.id && ele.id == ele.title) {
  2360. // bool = true;
  2361. // }
  2362. // });
  2363. let properties = element.ProcessAttrList.map((v) => {
  2364. return { name: v.name, value: v.selected_value || "" };
  2365. });
  2366. if (bool) {
  2367. let res = await this.axios({
  2368. method: "post",
  2369. url: "/api/order_area_explode_process",
  2370. data: {
  2371. parts_id: element.part_id_save,
  2372. price: element.process_price || 0,
  2373. properties,
  2374. title: element.processCombination || "",
  2375. procedure: element.partsProcessLineTableData,
  2376. op: "add",
  2377. },
  2378. });
  2379. if (res.code == 200) {
  2380. element.route_id = res.data.id;
  2381. } else {
  2382. save_sucess = false;
  2383. }
  2384. } else {
  2385. element.route_id = element.processCombination;
  2386. }
  2387. }
  2388. }
  2389. this.formData.parts.forEach((element) => {
  2390. element.processCombination = element.processCombination || "";
  2391. element.properties = element.processCombination || "";
  2392. element.detail = [
  2393. ...element.partsWoodTableData,
  2394. ...element.partsMetalseData,
  2395. ];
  2396. });
  2397. // 产品编辑保存
  2398. if (save_sucess) {
  2399. await this.axios({
  2400. method: "post",
  2401. url: "/api/order_area_explode_save",
  2402. data: {
  2403. ...this.formData,
  2404. order_no: this.$route.query.order_no,
  2405. oa_id: this.$route.query.oa_id,
  2406. orders_area_product_detail_id: this.$route.query
  2407. .orders_area_product_detail_id,
  2408. },
  2409. }).then((res) => {
  2410. if (res.code == 200) {
  2411. this.$Message.success(res.msg);
  2412. this.goback();
  2413. }
  2414. });
  2415. }
  2416. }
  2417. },
  2418. goback() {
  2419. this.$router.go(-1);
  2420. },
  2421. successKey(str) {
  2422. if (this.keyUseType == 1) {
  2423. this.formData.parts[this.attrParentindex].partsWoodTableData[
  2424. this.attrIndex
  2425. ][this.attrName] = str;
  2426. // this.$set(this.formData.parts[this.attrParentindex].partsWoodTableData[this.attrIndex],[this.attrName], str)
  2427. } else {
  2428. this.formData.parts[this.attrParentindex][this.attrName] = str;
  2429. }
  2430. this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
  2431. this.showKey = false;
  2432. this.$forceUpdate();
  2433. },
  2434. cancelKey() {
  2435. this.showKey = false;
  2436. },
  2437. handleMeasureSearch() {},
  2438. openKey(partsIndex, index, attr, partsItem) {
  2439. this.showKey = true;
  2440. this.attrParentindex = partsIndex;
  2441. if (index != -1) {
  2442. this.attrIndex = index;
  2443. this.keyUseType = 1;
  2444. this.KeyBoardValue = partsItem.partsWoodTableData[index][attr] + "";
  2445. } else {
  2446. this.keyUseType = 2;
  2447. this.KeyBoardValue = partsItem[attr] + "";
  2448. }
  2449. this.attrName = attr;
  2450. // })
  2451. },
  2452. changeSe(e, n, partsIndex, row) {
  2453. if (e) {
  2454. let event = window.event;
  2455. let unit = event.target.dataset.unit;
  2456. // row.company = unit ? unit : ''
  2457. // row.thick = e.tag
  2458. // row.title = e.title
  2459. this.formData.parts[partsIndex].partsWoodTableData[n].company = unit
  2460. ? unit
  2461. : "";
  2462. this.formData.parts[partsIndex].partsWoodTableData[n].thick = e.tag;
  2463. this.formData.parts[partsIndex].partsWoodTableData[n].title = e.title;
  2464. }
  2465. },
  2466. changeMetal(e, n, partsIndex) {
  2467. let event = window.event;
  2468. let unit = event.target.dataset.unit;
  2469. this.formData.parts[partsIndex].partsMetalseData[n].company = unit
  2470. ? unit
  2471. : "";
  2472. },
  2473. handleMetalTotalPriceChange(row) {
  2474. row.total_price = 1 * row.price * row.number;
  2475. },
  2476. handleClick(e) {
  2477. let data = JSON.parse(e);
  2478. this.nowSelectObj = data;
  2479. this.info.bp_id = this.nowSelectObj.id;
  2480. this.axios("/api/basics_product_list", {
  2481. params: { id: this.nowSelectObj.id },
  2482. }).then((res) => {
  2483. res.data.forEach((element) => {
  2484. if (element.id == this.nowSelectObj.id) {
  2485. this.measureList = element.measure;
  2486. }
  2487. });
  2488. });
  2489. },
  2490. checkImg(item) {
  2491. let list = [];
  2492. item.forEach((el) => {
  2493. list.push({ img_url: el });
  2494. });
  2495. // this.axios('/api/orders_img', { params: { id: this.order_area_product_id, type: 1 } }).then(res => {
  2496. // if (res.code == 200) {
  2497. this.$previewImg({
  2498. list,
  2499. baseUrl: this.$store.state.ip,
  2500. baseImgField: "img_url",
  2501. baseTitleField: "",
  2502. });
  2503. // }
  2504. // })
  2505. },
  2506. },
  2507. // 监听属性 类似于data概念
  2508. computed: {},
  2509. // 监控data中的数据变化
  2510. watch: {},
  2511. beforeCreate() {}, // 生命周期 - 创建之前
  2512. beforeMount() {}, // 生命周期 - 挂载之前
  2513. beforeUpdate() {}, // 生命周期 - 更新之前
  2514. updated() {}, // 生命周期 - 更新之后
  2515. beforeDestroy() {}, // 生命周期 - 销毁之前
  2516. destroyed() {}, // 生命周期 - 销毁完成
  2517. activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
  2518. };
  2519. </script>
  2520. <style lang="scss" scoped>
  2521. .BidSystemProductDeOrderDeorderdetail {
  2522. position: relative;
  2523. overflow: hidden;
  2524. overflow-y: auto;
  2525. .top_info {
  2526. display: flex;
  2527. justify-content: flex-start;
  2528. align-items: center;
  2529. flex-wrap: wrap;
  2530. padding: 10px;
  2531. span {
  2532. min-width: 40px;
  2533. margin-right: 5px;
  2534. }
  2535. div {
  2536. display: flex;
  2537. justify-content: flex-start;
  2538. align-items: center;
  2539. width: 200px;
  2540. padding: 10px;
  2541. img {
  2542. max-width: 60px;
  2543. }
  2544. }
  2545. }
  2546. .similar_product {
  2547. position: relative;
  2548. padding: 15px;
  2549. margin-bottom: 30px;
  2550. border-radius: 5px;
  2551. box-shadow: 1px 1px 5px 1px #999;
  2552. display: flex;
  2553. justify-content: flex-start;
  2554. align-items: center;
  2555. }
  2556. .parts {
  2557. position: relative;
  2558. padding: 15px;
  2559. margin-bottom: 30px;
  2560. border-radius: 5px;
  2561. box-shadow: 1px 1px 5px 1px #999;
  2562. /deep/ .ivu-form-item {
  2563. display: inline-block;
  2564. width: 350px;
  2565. }
  2566. .parts_title {
  2567. display: flex;
  2568. justify-content: space-between;
  2569. }
  2570. .parts_content {
  2571. font-size: 14px;
  2572. .parts_content_attr {
  2573. display: flex;
  2574. justify-content: flex-start;
  2575. align-items: center;
  2576. flex-wrap: wrap;
  2577. // width: 350px;
  2578. span {
  2579. width: 80px;
  2580. text-align: center;
  2581. }
  2582. div {
  2583. display: flex;
  2584. width: 100%;
  2585. justify-content: flex-start;
  2586. align-items: center;
  2587. margin: 5px 0;
  2588. span {
  2589. margin: 0 5px;
  2590. }
  2591. }
  2592. }
  2593. .parts_content_line {
  2594. // width: 350px;
  2595. padding-left: 17px;
  2596. span {
  2597. margin-right: 5px;
  2598. }
  2599. }
  2600. .parts_content_lineTable,
  2601. .parts_content_partTable,
  2602. .parts_content_metalsTable {
  2603. margin: 10px 0;
  2604. }
  2605. .parts_content_part {
  2606. span {
  2607. margin-right: 5px;
  2608. }
  2609. }
  2610. .parts_content_lineTable {
  2611. overflow: hidden;
  2612. }
  2613. }
  2614. }
  2615. }
  2616. .similarProductModal,
  2617. .ProcessLineModal {
  2618. /deep/ .ivu-form-item {
  2619. display: inline-block;
  2620. width: 220px;
  2621. }
  2622. }
  2623. .page {
  2624. display: flex;
  2625. justify-content: center;
  2626. margin-top: 10px;
  2627. }
  2628. .hierarchy {
  2629. .radio-g {
  2630. padding: 10px 0;
  2631. display: flex;
  2632. justify-content: flex-start;
  2633. align-items: center;
  2634. .radio-box {
  2635. display: flex;
  2636. flex-wrap: wrap;
  2637. justify-content: flex-start;
  2638. border-left: 1px solid #3764ff;
  2639. .radio-us {
  2640. background: #fff;
  2641. padding: 5px 20px;
  2642. margin: 5px;
  2643. margin-right: 18px;
  2644. color: #3764ff;
  2645. border-radius: 15px;
  2646. border: 1px solid #3764ff;
  2647. cursor: pointer;
  2648. }
  2649. .radio-us-foc {
  2650. color: #fff;
  2651. background: #3764ff;
  2652. border: 1px solid #3764ff;
  2653. }
  2654. }
  2655. .tit_box {
  2656. .box-us {
  2657. background: #fff;
  2658. padding: 5px 20px;
  2659. margin: 5px;
  2660. margin-right: 18px;
  2661. color: #3764ff;
  2662. border-radius: 5px;
  2663. border: 1px solid #3764ff;
  2664. cursor: pointer;
  2665. width: 100px;
  2666. display: inline-block;
  2667. text-align: center;
  2668. }
  2669. .box-us-foc {
  2670. color: #fff;
  2671. background: #3764ff;
  2672. border: 1px solid #3764ff;
  2673. }
  2674. }
  2675. .radio-us-none {
  2676. display: none;
  2677. }
  2678. }
  2679. }
  2680. .modal_process_route1 {
  2681. display: flex;
  2682. justify-content: space-around;
  2683. }
  2684. .modal_process_route {
  2685. .modal_process_route_top {
  2686. display: flex;
  2687. justify-content: space-around;
  2688. padding: 10px 0;
  2689. }
  2690. }
  2691. /deep/ .ivu-table-wrapper {
  2692. overflow: visible;
  2693. }
  2694. /deep/ .ivu-modal {
  2695. .modal_process_route_content {
  2696. max-height: 600px;
  2697. position: relative;
  2698. overflow: hidden;
  2699. overflow-y: auto;
  2700. }
  2701. }
  2702. .SortableList {
  2703. // display: flex;
  2704. // justify-content: flex-start;
  2705. // align-items: center;
  2706. // flex-wrap: wrap;
  2707. .SortableItem {
  2708. .tag-modal {
  2709. display: flex;
  2710. align-items: center;
  2711. .before {
  2712. width: 20px;
  2713. background: #3764ff;
  2714. height: 24px;
  2715. border-radius: 5px 0 0 5px;
  2716. display: flex;
  2717. justify-content: center;
  2718. align-items: center;
  2719. color: #fff;
  2720. }
  2721. }
  2722. }
  2723. }
  2724. /deep/.ivu-modal-body {
  2725. // height: 750px;
  2726. // overflow: auto;
  2727. }
  2728. .modal_content {
  2729. display: flex;
  2730. justify-content: space-around;
  2731. height: 100%;
  2732. .modal_content_left {
  2733. max-width: 40%;
  2734. min-width: 30%;
  2735. border-right: 1px solid #d8d8d8;
  2736. }
  2737. .modal_content_right {
  2738. width: 60%;
  2739. max-height: 700px;
  2740. padding-left: 10px;
  2741. overflow: hidden;
  2742. overflow-y: auto;
  2743. font-size: 18px;
  2744. }
  2745. }
  2746. .vertical-center-modal1 {
  2747. display: flex;
  2748. align-items: center;
  2749. justify-content: center;
  2750. .ivu-modal {
  2751. top: 0;
  2752. }
  2753. }
  2754. /deep/.el-input--small .el-input__inner {
  2755. height: 24px;
  2756. line-height: 24px;
  2757. }
  2758. </style>