info.vue 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044
  1. <template>
  2. <div class="BidSystemContractInfo">
  3. <Toptitle title="查看工装订单">
  4. <slot name="titleButton">
  5. <!-- <Button
  6. type="primary"
  7. style="margin-right: 10px"
  8. :disabled="isChecked"
  9. @click="showAddInputModal = true"
  10. >
  11. 添加特殊字段
  12. </Button> -->
  13. <!-- <Button
  14. @click="showForms = true"
  15. v-show="currencyTab == 'name2'"
  16. type="primary"
  17. style="margin-right: 10px"
  18. >表单设置</Button
  19. > -->
  20. <Button
  21. @click="handleOpenModal"
  22. v-show="currencyTab == 'name2'"
  23. type="primary"
  24. style="margin-right: 10px"
  25. >批量下深化</Button
  26. >
  27. <Button
  28. @click="handleOpenModal"
  29. v-show="currencyTab != 'name2'"
  30. type="primary"
  31. style="margin-right: 10px"
  32. >下深化</Button
  33. >
  34. <Button
  35. @click="showSupModal = true"
  36. type="primary"
  37. style="margin-right: 10px"
  38. >项目辅料</Button
  39. >
  40. <Button
  41. @click="goback()"
  42. type="primary"
  43. ghost
  44. style="margin-right: 10px"
  45. >返回</Button
  46. >
  47. </slot>
  48. </Toptitle>
  49. <Tabs value="name1" @on-click="handleCurTabChange">
  50. <TabPane
  51. label="块状形式"
  52. name="name1"
  53. style="overflow: hidden; overflow-y: auto"
  54. >
  55. <div class="top_search">
  56. <Form :model="formData" :label-width="100" class="top_search_form">
  57. <FormItem label="订单号:">
  58. {{ formData.order_no }}
  59. </FormItem>
  60. <FormItem label="项目名称:">
  61. {{ formData.residential_name }}
  62. </FormItem>
  63. <FormItem label="客户姓名:">
  64. {{ formData.client_name }}
  65. </FormItem>
  66. <FormItem label="紧急程度:">
  67. <span
  68. v-for="_item in warningList"
  69. :key="_item.id"
  70. v-show="_item.id == formData.warning_state"
  71. :style="{ color: _item.color }"
  72. >{{ _item.title }}
  73. </span>
  74. </FormItem>
  75. <FormItem label="项目定金:">
  76. {{ formData.front_money }}
  77. <!-- <RadioGroup v-model="formData.pay_state"
  78. size="small">
  79. <Radio :label=0
  80. :disabled="isChecked">未收款</Radio>
  81. <Radio :label=1
  82. :disabled="isChecked">已收款</Radio>
  83. </RadioGroup> -->
  84. </FormItem>
  85. <FormItem label="详细地址:">
  86. {{ formData.address }}
  87. </FormItem>
  88. <FormItem label="手机号:">
  89. {{ formData.mobile }}
  90. </FormItem>
  91. <FormItem label="开始日期:">
  92. {{
  93. formData.start_time
  94. ? func.replaceDateNoHMS(formData.start_time)
  95. : ""
  96. }}
  97. </FormItem>
  98. <FormItem label="结束日期:">
  99. {{
  100. formData.end_time
  101. ? func.replaceDateNoHMS(formData.end_time)
  102. : ""
  103. }}
  104. </FormItem>
  105. <FormItem label="业务员:">
  106. <span
  107. v-for="_item in salesmanList"
  108. :key="_item.id"
  109. v-show="_item.id == formData.salesman"
  110. :style="{ color: _item.color }"
  111. >{{ _item.nickname }}
  112. </span>
  113. </FormItem>
  114. <!-- <FormItem label="订单类型:">
  115. <Select v-model="formData.type"
  116. :disabled="isChecked"
  117. size="small"
  118. style="width:200px">
  119. <Option label='工装'
  120. :value=1></Option>
  121. <Option label='家装'
  122. :value=2></Option>
  123. </Select>
  124. </FormItem> -->
  125. <FormItem
  126. v-for="item in formData.special"
  127. :key="item.id"
  128. :label="item.key + ':'"
  129. >
  130. {{ item.value }}
  131. </FormItem>
  132. <FormItem label="备注:">
  133. {{ formData.remark }}
  134. </FormItem>
  135. </Form>
  136. </div>
  137. <div
  138. class="addArea"
  139. v-for="(areaItem, areaIndex) in formData.list"
  140. :key="areaItem.areaIndex"
  141. >
  142. <div class="addAreaBtn">
  143. <Button
  144. @click="handleShowCurrencyArea(areaItem, areaIndex)"
  145. size="small"
  146. type="primary"
  147. style="margin-right:10px"
  148. v-show="!(areaItem.product && areaItem.product.length > 0)"
  149. >展示产品</Button
  150. >
  151. <!-- <Button
  152. @click="handleHiddenCurrencyArea(areaItem, areaIndex)"
  153. size="small"
  154. type="primary"
  155. style="margin-right:10px"
  156. v-show="areaItem.product && areaItem.product.length > 0"
  157. >收缩</Button
  158. > -->
  159. <Button
  160. @click="handleOpenModal"
  161. size="small"
  162. type="primary"
  163. style="margin-right:10px"
  164. v-show="areaItem.product && areaItem.product.length > 0"
  165. >下深化</Button
  166. >
  167. <Button
  168. size="small"
  169. type="primary"
  170. v-show="areaItem.isAllDeeped && areaItem.product.length > 0"
  171. >已下深化</Button
  172. >
  173. </div>
  174. <div class="addAreaForm">
  175. <Form :label-width="100" :model="areaItem" style="width: 60%">
  176. <FormItem label="区域编码:">
  177. {{ areaItem.num }}
  178. </FormItem>
  179. <FormItem label="区域名称:">
  180. {{ areaItem.title }}
  181. </FormItem>
  182. <FormItem label="单位:">
  183. {{ areaItem.unit }}
  184. </FormItem>
  185. <FormItem label="工程量:">
  186. {{ areaItem.quantity }}
  187. </FormItem>
  188. <FormItem label="户型:">
  189. {{ areaItem.house_type }}
  190. </FormItem>
  191. <FormItem
  192. v-for="item in areaItem.special"
  193. :key="item.id"
  194. :label="item.key + ':'"
  195. >
  196. {{ item.value }}
  197. </FormItem>
  198. <FormItem label="备注:">
  199. {{ areaItem.remark }}
  200. </FormItem>
  201. </Form>
  202. </div>
  203. <div class="addAreaTable">
  204. <Table
  205. v-show="areaItem.isCurrencyArea"
  206. :columns="tableColumns"
  207. @on-selection-change="handleSelection"
  208. :data="areaItem.product"
  209. max-height="600"
  210. border
  211. >
  212. <template slot="set" slot-scope="{ row, index }">
  213. <a
  214. :disabled="row.sub_state == 1"
  215. @click="handleRowDeep(row, index)"
  216. >下深化</a
  217. >
  218. </template>
  219. </Table>
  220. </div>
  221. </div>
  222. <li v-show="false" v-for="item in formData.list" :key="item.id"></li>
  223. </TabPane>
  224. <TabPane
  225. label="列表形式"
  226. name="name2"
  227. style="overflow: hidden; overflow-y: auto"
  228. >
  229. <div class="top_search">
  230. <div class="top_search_content">
  231. <Form
  232. :model="searchData"
  233. :label-width="100"
  234. class="top_search_form"
  235. >
  236. <FormItem label="区域编码:">
  237. <Select
  238. filterable
  239. clearable
  240. v-model="searchData.area_no"
  241. size="small"
  242. style="width:120px"
  243. >
  244. <Option
  245. v-for="(_item, _index) in area_no_list"
  246. :key="_index"
  247. :label="_item"
  248. :value="_item"
  249. ></Option>
  250. </Select>
  251. <!-- <Input
  252. type="text"
  253. size="small"
  254. clearable
  255. v-model="searchData.area_no"
  256. placeholder="请输入区域编码"
  257. style="width: 120px"
  258. /> -->
  259. </FormItem>
  260. <FormItem label="区域名称:">
  261. <Select
  262. filterable
  263. clearable
  264. v-model="searchData.area_title"
  265. size="small"
  266. style="width:120px"
  267. >
  268. <Option
  269. v-for="(_item, _index) in area_title_list"
  270. :key="_index"
  271. :label="_item"
  272. :value="_item"
  273. ></Option>
  274. </Select>
  275. <!-- <Input
  276. type="text"
  277. size="small"
  278. clearable
  279. v-model="searchData.area_title"
  280. placeholder="请输入区域名称"
  281. style="width: 120px"
  282. /> -->
  283. </FormItem>
  284. <FormItem label="产品名称:">
  285. <Select
  286. filterable
  287. clearable
  288. v-model="searchData.product_title"
  289. size="small"
  290. style="width:120px"
  291. >
  292. <Option
  293. v-for="(_item, _index) in product_title_list"
  294. :key="_index"
  295. :label="_item"
  296. :value="_item"
  297. ></Option>
  298. </Select>
  299. <!-- <Input
  300. type="text"
  301. size="small"
  302. clearable
  303. v-model="searchData.product_title"
  304. placeholder="请输入产品名称"
  305. style="width: 120px"
  306. /> -->
  307. </FormItem>
  308. <FormItem label="图号:">
  309. <Select
  310. filterable
  311. clearable
  312. v-model="searchData.url_number"
  313. size="small"
  314. style="width:120px"
  315. >
  316. <Option
  317. v-for="(_item, _index) in url_number_list"
  318. :key="_index"
  319. :label="_item"
  320. :value="_item"
  321. ></Option>
  322. </Select>
  323. <!-- <Input
  324. type="text"
  325. size="small"
  326. clearable
  327. v-model="searchData.url_number"
  328. placeholder="请输入图号"
  329. style="width: 120px"
  330. /> -->
  331. </FormItem>
  332. <FormItem label="深化状态:">
  333. <Select
  334. clearable
  335. v-model="searchData.sub_state"
  336. size="small"
  337. style="width:120px"
  338. >
  339. <Option label="已下深化" :value="1"></Option>
  340. <Option label="未下深化" :value="0"></Option>
  341. </Select>
  342. </FormItem>
  343. <FormItem>
  344. <Button @click="getListData" type="primary" size="small"
  345. >搜索</Button
  346. >
  347. </FormItem>
  348. </Form>
  349. </div>
  350. <Form :model="formData" :label-width="100" class="top_search_form">
  351. <FormItem label="订单号:">
  352. {{ formData.order_no }}
  353. </FormItem>
  354. <FormItem label="项目名称:">
  355. {{ formData.residential_name }}
  356. </FormItem>
  357. <FormItem label="客户姓名:">
  358. {{ formData.client_name }}
  359. </FormItem>
  360. <FormItem label="紧急程度:">
  361. <span
  362. v-for="_item in warningList"
  363. :key="_item.id"
  364. v-show="_item.id == formData.warning_state"
  365. :style="{ color: _item.color }"
  366. >{{ _item.title }}
  367. </span>
  368. </FormItem>
  369. <FormItem label="项目定金:">
  370. {{ formData.front_money }}
  371. <!-- <RadioGroup v-model="formData.pay_state"
  372. size="small">
  373. <Radio :label=0
  374. :disabled="isChecked">未收款</Radio>
  375. <Radio :label=1
  376. :disabled="isChecked">已收款</Radio>
  377. </RadioGroup> -->
  378. </FormItem>
  379. <FormItem label="详细地址:">
  380. {{ formData.address }}
  381. </FormItem>
  382. <FormItem label="手机号:">
  383. {{ formData.mobile }}
  384. </FormItem>
  385. <FormItem label="开始日期:">
  386. {{
  387. formData.start_time
  388. ? func.replaceDateNoHMS(formData.start_time)
  389. : ""
  390. }}
  391. </FormItem>
  392. <FormItem label="结束日期:">
  393. {{
  394. formData.end_time
  395. ? func.replaceDateNoHMS(formData.end_time)
  396. : ""
  397. }}
  398. </FormItem>
  399. <FormItem label="业务员:">
  400. <span
  401. v-for="_item in salesmanList"
  402. :key="_item.id"
  403. v-show="_item.id == formData.salesman"
  404. :style="{ color: _item.color }"
  405. >{{ _item.nickname }}
  406. </span>
  407. </FormItem>
  408. <!-- <FormItem label="订单类型:">
  409. <Select v-model="formData.type"
  410. :disabled="isChecked"
  411. size="small"
  412. style="width:200px">
  413. <Option label='工装'
  414. :value=1></Option>
  415. <Option label='家装'
  416. :value=2></Option>
  417. </Select>
  418. </FormItem> -->
  419. <FormItem
  420. v-for="item in formData.special"
  421. :key="item.id"
  422. :label="item.key + ':'"
  423. >
  424. {{ item.value }}
  425. </FormItem>
  426. <FormItem label="备注:">
  427. {{ formData.remark }}
  428. </FormItem>
  429. </Form>
  430. </div>
  431. <div>
  432. <Table
  433. :columns="listTableColumns"
  434. :data="listTableData"
  435. @on-selection-change="handleSelection"
  436. :max-height="500"
  437. border
  438. >
  439. <template slot="set" slot-scope="{ row, index }">
  440. <a
  441. :disabled="row.sub_state == 1"
  442. @click="handleRowDeep(row, index)"
  443. >下深化</a
  444. >
  445. </template>
  446. </Table>
  447. </div>
  448. <div ref="footercenter" class="footer-center">
  449. <Page
  450. transfer
  451. :total="total"
  452. :current.sync="page_index"
  453. :show-total="true"
  454. :page-size="page_size"
  455. :show-sizer="true"
  456. :show-elevator="true"
  457. @on-change="changePage"
  458. @on-page-size-change="changeSize"
  459. >
  460. </Page>
  461. </div>
  462. </TabPane>
  463. </Tabs>
  464. <!-- 项目辅料弹窗 -->
  465. <Modal title="项目辅料" v-model="showSupModal" :width="400">
  466. <div>
  467. <Table :columns="supTableColumns" :data="supTableData" border>
  468. <template slot="combine" slot-scope="{ index }">
  469. <Select
  470. v-model="supTableData[index].id"
  471. @on-change="handlechange"
  472. size="small"
  473. >
  474. <Option
  475. v-for="item in combineList"
  476. :value="item.id"
  477. :key="item.id"
  478. :label="item.title"
  479. ></Option>
  480. </Select>
  481. </template>
  482. <template slot="supSet" slot-scope="{ row, index }">
  483. <a
  484. style="margin: 0 5px; color: red"
  485. v-show="$route.query.type != 3"
  486. @click="handleSupSet(row, index)"
  487. >删除</a
  488. >
  489. </template>
  490. </Table>
  491. </div>
  492. <div class="modal-footer" slot="footer">
  493. <Button @click="showSupModal = false">取消</Button>
  494. <Button type="primary" @click="showSupModal = false">确认</Button>
  495. </div>
  496. </Modal>
  497. <!-- 编辑产品弹窗 -->
  498. <Modal
  499. title="编辑产品"
  500. v-model="showPDTEditModal"
  501. :mask-closable="false"
  502. class="addPDTFormModal"
  503. :width="1000"
  504. >
  505. <div class="modal-footer" slot="footer"></div>
  506. </Modal>
  507. <!-- 特殊字段弹窗 -->
  508. <Modal
  509. title="特殊字段"
  510. v-model="showAddInputModal"
  511. :mask-closable="false"
  512. class="addInputClassModal"
  513. :width="600"
  514. >
  515. <div class="addInputClass">
  516. <Tabs value="name1">
  517. <TabPane label="订单特殊字段" name="name1">
  518. <div style="display: flex; justify-content: center">
  519. <span
  520. class="dele_icon"
  521. @click="handleSpecValueAdd('', 1)"
  522. style="text-align: center; width: 50px"
  523. >添加
  524. </span>
  525. </div>
  526. <div class="addInputClassTab">
  527. <div v-for="(item, index) in contactSpecValueList" :key="index">
  528. <span>特殊字段名:</span>
  529. <Input
  530. type="text"
  531. size="small"
  532. v-model="item.key"
  533. placeholder="请输入"
  534. style="width: 120px"
  535. />
  536. <span class="dele_icon" style="margin-right: 5px">
  537. <Icon type="md-add" @click="handleSpecValueAdd(item, 1)" />
  538. </span>
  539. <span class="dele_icon">
  540. <Icon
  541. type="md-remove"
  542. @click="handleSpecValueDele(index, 1)"
  543. />
  544. </span>
  545. </div>
  546. </div>
  547. </TabPane>
  548. <TabPane label="区域特殊字段" name="name2">
  549. <div style="display: flex; justify-content: center">
  550. <span
  551. class="dele_icon"
  552. @click="handleSpecValueAdd('', 2)"
  553. style="text-align: center; width: 50px"
  554. >添加
  555. </span>
  556. </div>
  557. <div class="addInputClassTab">
  558. <div v-for="(item, index) in areaSpecValueList" :key="index">
  559. <span>特殊字段名:</span>
  560. <Input
  561. type="text"
  562. size="small"
  563. v-model="item.key"
  564. placeholder="请输入"
  565. style="width: 120px"
  566. />
  567. <span class="dele_icon" style="margin-right: 5px">
  568. <Icon type="md-add" @click="handleSpecValueAdd(item, 2)" />
  569. </span>
  570. <span class="dele_icon">
  571. <Icon
  572. type="md-remove"
  573. @click="handleSpecValueDele(index, 2)"
  574. />
  575. </span>
  576. </div>
  577. </div>
  578. </TabPane>
  579. <TabPane label="产品特殊字段" name="name3">
  580. <div style="display: flex; justify-content: center">
  581. <span
  582. class="dele_icon"
  583. @click="handleSpecValueAdd('', 3)"
  584. style="text-align: center; width: 50px"
  585. >添加
  586. </span>
  587. </div>
  588. <div class="addInputClassTab">
  589. <div v-for="(item, index) in productSpecValueList" :key="index">
  590. <span>特殊字段名:</span>
  591. <Input
  592. type="text"
  593. size="small"
  594. v-model="item.key"
  595. placeholder="请输入"
  596. style="width: 120px"
  597. />
  598. <span class="dele_icon" style="margin-right: 5px">
  599. <Icon type="md-add" @click="handleSpecValueAdd(item, 3)" />
  600. </span>
  601. <span class="dele_icon">
  602. <Icon
  603. type="md-remove"
  604. @click="handleSpecValueDele(index, 3)"
  605. />
  606. </span>
  607. </div>
  608. </div>
  609. </TabPane>
  610. </Tabs>
  611. <!-- <Form :label-width="100">
  612. <FormItem label="请输入字段名:">
  613. <Input type="text"
  614. size="small"
  615. v-model="addInputName"
  616. placeholder="请输入"
  617. style="width: 200px" />
  618. </FormItem>
  619. </Form> -->
  620. </div>
  621. <div class="modal-footer" slot="footer">
  622. <Button @click="showAddInputModal = false">取消</Button>
  623. <Button type="primary" @click="handleAddInputConfirm">确认</Button>
  624. </div>
  625. </Modal>
  626. <!-- 批量下深化 -->
  627. <Modal v-model="processModal" title="下深化">
  628. <div>
  629. <div class="process_modal">
  630. <span>深化人员:</span>
  631. <Select v-model="process_man" style="width: 150px">
  632. <Option
  633. v-for="item in processManList"
  634. :key="item.id"
  635. :label="item.nickname"
  636. :value="item.id"
  637. ></Option>
  638. </Select>
  639. </div>
  640. <div class="process_modal">
  641. <span>选择时间:</span>
  642. <DatePicker
  643. type="date"
  644. v-model="process_start_time"
  645. placeholder="年/月/日"
  646. style="width: 150px"
  647. ></DatePicker>
  648. <DatePicker
  649. type="date"
  650. v-model="process_end_time"
  651. placeholder="年/月/日"
  652. style="width: 150px"
  653. ></DatePicker>
  654. </div>
  655. </div>
  656. <div slot="footer">
  657. <Button @click="processModal = false">取消</Button>
  658. <Button type="primary" @click="handleProcess">确认</Button>
  659. </div>
  660. </Modal>
  661. <!-- 表单设置 -->
  662. <!-- <Modal
  663. v-model="showForms"
  664. @on-ok="postForms(1)"
  665. class-name="vertical-center-modal"
  666. style="max-height: 700px; overflow: hidden; overflow-y: auto"
  667. title="表单设置"
  668. >
  669. <Table
  670. :max-height="600"
  671. border
  672. :columns="formSetTableColumns"
  673. :data="post_formSetTableData"
  674. >
  675. </Table>
  676. </Modal> -->
  677. </div>
  678. </template>
  679. <script>
  680. // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  681. // 例如:import 《组件名称》 from '《组件路径》';
  682. export default {
  683. name: "BidSystemContractInfo",
  684. components: {},
  685. props: {},
  686. // import引入的组件需要注入到对象中才能使用
  687. data() {
  688. // 这里存放数据
  689. return {
  690. showSupModal: false,
  691. showPDTEditModal: false,
  692. options: {
  693. disabledDate(date) {
  694. return date && date.valueOf() < Date.now() - 86400000;
  695. },
  696. },
  697. formData: {
  698. order_no: "",
  699. residential_name: "",
  700. client_name: "",
  701. address: "",
  702. mobile: "",
  703. pay_state: "",
  704. warning_state: "",
  705. salesman: "",
  706. remark: "",
  707. start_time: "",
  708. end_time: "",
  709. type: "",
  710. special: [],
  711. head: [],
  712. //区域列表
  713. list: [
  714. {
  715. areaIndex: null,
  716. num: "",
  717. title: "",
  718. unit: "",
  719. quantity: "",
  720. house_type: "",
  721. remark: "",
  722. order_no: "",
  723. product: [],
  724. },
  725. ],
  726. },
  727. tableColumns: [
  728. { type: "selection", align: "center", minWidth: 100 },
  729. { title: "序号", key: "index", align: "center", minWidth: 80 },
  730. {
  731. title: "产品名称",
  732. key: "title",
  733. align: "center",
  734. tooltip: true,
  735. minWidth: 100,
  736. },
  737. { title: "数量", key: "num", align: "center", minWidth: 80 },
  738. { title: "价格", key: "price", align: "center", minWidth: 80 },
  739. {
  740. title: "规格",
  741. key: "measure",
  742. align: "center",
  743. tooltip: true,
  744. minWidth: 140,
  745. },
  746. {
  747. title: "工艺属性",
  748. key: "process_property",
  749. align: "center",
  750. tooltip: true,
  751. minWidth: 120,
  752. },
  753. {
  754. title: "图纸",
  755. align: "center",
  756. key: "url",
  757. minWidth: 100,
  758. render: (h, params) => {
  759. const { row } = params;
  760. let url = row.url ? row.url : [];
  761. return h("img", {
  762. attrs: {
  763. src: this.$store.state.ip + url[0],
  764. style:
  765. "max-width:50px;max-height:50px;position:relative;top:3px;",
  766. },
  767. on: {
  768. click: (e) => {
  769. // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
  770. // row.imgs = res.data
  771. let list = [];
  772. row.url.forEach((el) => {
  773. list.push({ img_url: el });
  774. });
  775. this.$previewImg({
  776. list,
  777. baseUrl: this.$store.state.ip,
  778. baseImgField: "img_url",
  779. baseTitleField: "",
  780. });
  781. // })
  782. },
  783. },
  784. });
  785. },
  786. },
  787. {
  788. title: "左右式",
  789. key: "left_right_mode",
  790. align: "center",
  791. tooltip: true,
  792. minWidth: 80,
  793. render: (h, params) => {
  794. return h(
  795. "span",
  796. {},
  797. params.row.left_right_mode == 1
  798. ? "左式"
  799. : params.row.left_right_mode == 2
  800. ? "右式"
  801. : ""
  802. );
  803. },
  804. },
  805. {
  806. title: "图号",
  807. key: "url_number",
  808. align: "center",
  809. tooltip: true,
  810. minWidth: 80,
  811. },
  812. { title: "备注", key: "remark", align: "center", minWidth: 80 },
  813. {
  814. title: "是否下深化",
  815. key: "sub_state",
  816. align: "center",
  817. minWidth: 80,
  818. render: (h, params) => {
  819. return h("span", {}, params.row.sub_state == 1 ? "是" : "否");
  820. },
  821. },
  822. {
  823. title: "操作",
  824. key: "set",
  825. align: "center",
  826. minWidth: 100,
  827. slot: "set",
  828. },
  829. ],
  830. supTableColumns: [
  831. { title: "序号", type: "index", align: "center", minWidth: 100 },
  832. {
  833. title: "辅料名称",
  834. key: "title",
  835. align: "center",
  836. slot: "combine",
  837. minWidth: 150,
  838. },
  839. {
  840. title: "操作",
  841. key: "set",
  842. align: "center",
  843. slot: "supSet",
  844. minWidth: 100,
  845. },
  846. ],
  847. listTableColumns: [
  848. { type: "selection", align: "center", minWidth: 100 },
  849. { title: "区域编码", key: "area_num", align: "center", minWidth: 100 },
  850. {
  851. title: "区域名称",
  852. key: "area_title",
  853. align: "center",
  854. minWidth: 100,
  855. },
  856. { title: "单位", key: "area_unit", align: "center", minWidth: 100 },
  857. {
  858. title: "工程量",
  859. key: "area_quantity",
  860. align: "center",
  861. minWidth: 100,
  862. },
  863. { title: "户型", key: "house_type", align: "center", minWidth: 100 },
  864. { title: "备注", key: "area_remark", align: "center", minWidth: 100 },
  865. { title: "产品名称", key: "title", align: "center", minWidth: 100 },
  866. { title: "数量", key: "num", align: "center", minWidth: 100 },
  867. { title: "价格", key: "price", align: "center", minWidth: 100 },
  868. { title: "规格", key: "measure", align: "center", minWidth: 100 },
  869. {
  870. title: "工艺属性",
  871. key: "process_property",
  872. align: "center",
  873. minWidth: 100,
  874. },
  875. {
  876. title: "图纸",
  877. key: "url",
  878. align: "center",
  879. minWidth: 100,
  880. render: (h, params) => {
  881. const { row } = params;
  882. let url = row.url ? row.url : [];
  883. return h("img", {
  884. attrs: {
  885. src:
  886. url.length > 0 ? this.$store.state.ip + url[0].img_url : "",
  887. style:
  888. "max-width:50px;max-height:50px;position:relative;top:3px;",
  889. },
  890. on: {
  891. click: () => {
  892. // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
  893. // row.imgs = res.data
  894. let list = [];
  895. row.url.forEach((el) => {
  896. list.push({ img_url: el });
  897. });
  898. this.$previewImg({
  899. list,
  900. baseUrl: this.$store.state.ip,
  901. baseImgField: "img_url",
  902. baseTitleField: "",
  903. });
  904. // })
  905. },
  906. },
  907. });
  908. },
  909. },
  910. {
  911. title: "左右式",
  912. key: "left_right_mode",
  913. align: "center",
  914. minWidth: 100,
  915. },
  916. { title: "图号", key: "url_number", align: "center", minWidth: 100 },
  917. { title: "备注", key: "remark", align: "center", minWidth: 100 },
  918. { title: "备注", key: "remark", align: "center", minWidth: 100 },
  919. {
  920. title: "深化状态",
  921. key: "sub_state",
  922. align: "center",
  923. minWidth: 100,
  924. render: (h, params) => {
  925. return h(
  926. "span",
  927. {},
  928. params.row.sub_state == 1 ? "已下深化" : "未下深化"
  929. );
  930. },
  931. },
  932. {
  933. title: "操作",
  934. key: "set",
  935. align: "center",
  936. minWidth: 100,
  937. slot: "set",
  938. },
  939. ],
  940. listTableData: [],
  941. supTableData: [],
  942. PDTTypeList: [], //产品分类列表
  943. PDTEditTypeList: [],
  944. combineList: [], //项目辅料→辅料名称列表
  945. salesmanList: [], //业务员列表
  946. //是否查看
  947. isChecked: false,
  948. PDTProcessAttrList: [],
  949. // 测量字段列表
  950. measureList: [],
  951. contactForm: [],
  952. addInputTitle: "",
  953. showAddInputModal: false,
  954. addInputName: "",
  955. contactSpecValueList: [],
  956. areaSpecValueList: [],
  957. productSpecValueList: [],
  958. warningList: [],
  959. currencyTab: "",
  960. processModal: false,
  961. processManList: [],
  962. process_man: "",
  963. process_start_time: "",
  964. process_end_time: "",
  965. selected: [],
  966. page_index: 1,
  967. page_size: 10,
  968. total: 0,
  969. searchData: {},
  970. showForms: false,
  971. formSetTableColumns: [
  972. {
  973. title: "是否展示",
  974. align: "center",
  975. key: "is_show",
  976. minWidth: 60,
  977. render: (h, params) => {
  978. const { index } = params;
  979. const currentRow = JSON.parse(
  980. JSON.stringify(this.post_formSetTableData[index])
  981. );
  982. return h("Checkbox", {
  983. props: {
  984. value: currentRow.is_show,
  985. disabled:
  986. currentRow.key == "order_no" ||
  987. currentRow.key == "residential_name" ||
  988. currentRow.key == "warning_state" ||
  989. currentRow.key == "start_time" ||
  990. currentRow.key == "end_time" ||
  991. currentRow.key == "client_name" ||
  992. currentRow.key == "predict_price" ||
  993. currentRow.key == "box_id" ||
  994. currentRow.key == "predict_price" ||
  995. currentRow.key == "order_price" ||
  996. currentRow.key == "fax_price" ||
  997. currentRow.key == "remark",
  998. },
  999. on: {
  1000. "on-change": (e) => {
  1001. currentRow.is_show = e;
  1002. this.post_formSetTableData.splice(index, 1, currentRow);
  1003. },
  1004. },
  1005. });
  1006. },
  1007. },
  1008. {
  1009. title: "字段名",
  1010. align: "center",
  1011. key: "value",
  1012. minWidth: 100,
  1013. },
  1014. {
  1015. title: "展示名称",
  1016. align: "center",
  1017. key: "title",
  1018. minWidth: 100,
  1019. render: (h, params) => {
  1020. const { index } = params;
  1021. const currentRow = JSON.parse(
  1022. JSON.stringify(this.post_formSetTableData[index])
  1023. );
  1024. return h("Input", {
  1025. props: {
  1026. value: currentRow.title,
  1027. type: "text",
  1028. },
  1029. on: {
  1030. "on-change": (e) => {
  1031. currentRow.title = e.target.value;
  1032. this.post_formSetTableData.splice(index, 1, currentRow);
  1033. },
  1034. },
  1035. });
  1036. },
  1037. },
  1038. ],
  1039. post_formSetTableData: [],
  1040. formSetTableData: [
  1041. {
  1042. is_show: true,
  1043. key: "order_no",
  1044. value: "订单编号",
  1045. title: "订单编号",
  1046. },
  1047. {
  1048. is_show: true,
  1049. key: "residential_name",
  1050. value: "项目名称",
  1051. title: "项目名称",
  1052. },
  1053. {
  1054. is_show: true,
  1055. key: "warning_state",
  1056. value: "紧急程度",
  1057. title: "紧急程度",
  1058. },
  1059. {
  1060. is_show: true,
  1061. key: "front_money",
  1062. value: "项目定金",
  1063. title: "项目定金",
  1064. },
  1065. {
  1066. is_show: true,
  1067. key: "start_time",
  1068. value: "开始日期",
  1069. title: "开始日期",
  1070. },
  1071. {
  1072. is_show: true,
  1073. key: "client_name",
  1074. value: "客户名称",
  1075. title: "客户名称",
  1076. },
  1077. {
  1078. is_show: true,
  1079. key: "custom_detail_name",
  1080. value: "负责人",
  1081. title: "负责人",
  1082. },
  1083. {
  1084. is_show: true,
  1085. key: "custom_detail_mobile",
  1086. value: "手机号",
  1087. title: "手机号",
  1088. },
  1089. {
  1090. is_show: true,
  1091. key: "custom_detail_id",
  1092. value: "详细地址",
  1093. title: "详细地址",
  1094. },
  1095. {
  1096. is_show: true,
  1097. key: "service_id",
  1098. value: "专营业务员",
  1099. title: "专营业务员",
  1100. },
  1101. {
  1102. is_show: true,
  1103. key: "end_time",
  1104. value: "交付日期",
  1105. title: "交付日期",
  1106. },
  1107. {
  1108. is_show: true,
  1109. key: "predict_price",
  1110. value: "产品总价",
  1111. title: "产品总价",
  1112. },
  1113. {
  1114. is_show: true,
  1115. key: "order_price",
  1116. value: "订单金额",
  1117. title: "订单金额",
  1118. },
  1119. {
  1120. is_show: true,
  1121. key: "fax_price",
  1122. value: "折扣金额",
  1123. title: "折扣金额",
  1124. },
  1125. { is_show: true, key: "box_id", value: "包装", title: "包装" },
  1126. { is_show: true, key: "remark", value: "订单备注", title: "订单备注" },
  1127. ],
  1128. area_no_list: [],
  1129. area_title_list: [],
  1130. product_title_list: [],
  1131. url_number_list: [],
  1132. };
  1133. },
  1134. // 生命周期 - 创建完成(可以访问当前this实例)
  1135. created() {
  1136. //2编辑 3详情 0新增
  1137. this.$route.query.type == 3 ? (this.isChecked = true) : "";
  1138. this.$route.query.order_no
  1139. ? (this.formData.order_no = this.$route.query.order_no)
  1140. : "";
  1141. // 获取表单设置列表
  1142. this.get_forms();
  1143. // 获取工艺属性
  1144. this.axios("/api/basics_properties_index").then((res) => {
  1145. this.PDTProcessAttrList = res.data.data;
  1146. });
  1147. // 获取紧急程度
  1148. this.axios.get("/api/warning_list").then((res) => {
  1149. this.warningList = res.data.data;
  1150. });
  1151. },
  1152. // 生命周期 - 挂载完成(可以访问DOM元素)
  1153. mounted() {
  1154. this.$route.query.type == 3 || this.$route.query.type == 2
  1155. ? this.initData(this.$route.query.order_no)
  1156. : "";
  1157. //获取操作员
  1158. this.axios("/api/user").then(
  1159. (res) => (
  1160. (this.salesmanList = res.data.data),
  1161. (this.processManList = res.data.data)
  1162. )
  1163. );
  1164. //获取产品分类下拉列表
  1165. this.axios("/api/parts_product_list").then((res) => {
  1166. this.PDTTypeList = res.data;
  1167. this.PDTTypeList.forEach((el) => {
  1168. el.value = el.id;
  1169. el.label = el.title;
  1170. });
  1171. this.PDTEditTypeList = this.PDTTypeList;
  1172. });
  1173. //获取基础测量字段列表
  1174. this.axios("/api/basics_measure_index").then((res) => {
  1175. this.measureList = res.data.data;
  1176. });
  1177. // 获取项目辅料列表
  1178. this.axios("/api/material_combination").then((res) => {
  1179. this.combineList = res.data.data;
  1180. });
  1181. },
  1182. methods: {
  1183. get_forms() {
  1184. this.axios
  1185. .post("/api/update/get_table", { id: "ContractList_info" })
  1186. .then((res) => {
  1187. if (Array.isArray(res.data)) {
  1188. this.post_formSetTableData = JSON.parse(
  1189. JSON.stringify(this.formSetTableData)
  1190. );
  1191. } else {
  1192. if (res.data.table.formSet && res.data.table.formSet.length > 0) {
  1193. this.formSetTableData = JSON.parse(
  1194. JSON.stringify(res.data.table.formSet)
  1195. );
  1196. this.post_formSetTableData = JSON.parse(
  1197. JSON.stringify(res.data.table.formSet)
  1198. );
  1199. } else {
  1200. this.post_formSetTableData = JSON.parse(
  1201. JSON.stringify(this.formSetTableData)
  1202. );
  1203. }
  1204. }
  1205. });
  1206. },
  1207. handlechange(val) {
  1208. console.log("val :>> ", val);
  1209. },
  1210. initData(order_no) {
  1211. this.axios({
  1212. method: "get",
  1213. url: "/api/order_area_list",
  1214. params: {
  1215. order_no,
  1216. type: 1,
  1217. },
  1218. }).then((res) => {
  1219. if (res.code == 200) {
  1220. this.formData = res.data;
  1221. this.supTableData = res.data.ext;
  1222. if (this.formData.list.length == 0) {
  1223. this.formData.list.push({
  1224. areaIndex: 1,
  1225. num: "",
  1226. title: "",
  1227. unit: "",
  1228. quantity: "",
  1229. house_type: "",
  1230. remark: "",
  1231. order_no: "",
  1232. special: [],
  1233. head: [],
  1234. product: [
  1235. {
  1236. title: "",
  1237. num: "",
  1238. measure: "",
  1239. process_property: "",
  1240. special: [],
  1241. url: [],
  1242. url_number: "",
  1243. remark: "",
  1244. },
  1245. ],
  1246. });
  1247. }
  1248. this.formData.start_time = this.func.replaceDateNoHMS(
  1249. this.formData.start_time
  1250. );
  1251. this.formData.end_time = this.func.replaceDateNoHMS(
  1252. this.formData.end_time
  1253. );
  1254. // 产品特殊字段→ 弹窗窗口,table表头
  1255. let arr = [];
  1256. res.data.head[3] &&
  1257. res.data.head[3].forEach((item) => {
  1258. // ele[key] = item.key
  1259. arr.push({
  1260. title: item.key,
  1261. key: item.key,
  1262. align: "center",
  1263. minWidth: 80,
  1264. });
  1265. });
  1266. this.tableColumns = [
  1267. { type: "selection", align: "center", minWidth: 100 },
  1268. { title: "序号", key: "index", align: "center", minWidth: 80 },
  1269. {
  1270. title: "产品名称",
  1271. key: "title",
  1272. align: "center",
  1273. tooltip: true,
  1274. minWidth: 100,
  1275. },
  1276. { title: "数量", key: "num", align: "center", minWidth: 80 },
  1277. { title: "价格", key: "price", align: "center", minWidth: 80 },
  1278. {
  1279. title: "规格",
  1280. key: "measure",
  1281. align: "center",
  1282. tooltip: true,
  1283. minWidth: 140,
  1284. },
  1285. {
  1286. title: "工艺属性",
  1287. key: "process_property",
  1288. align: "center",
  1289. tooltip: true,
  1290. minWidth: 120,
  1291. },
  1292. {
  1293. title: "图纸",
  1294. align: "center",
  1295. key: "url",
  1296. minWidth: 100,
  1297. render: (h, params) => {
  1298. const { row } = params;
  1299. let url = row.url ? row.url : [];
  1300. return h("img", {
  1301. attrs: {
  1302. src: this.$store.state.ip + url[0],
  1303. style:
  1304. "max-width:50px;max-height:50px;position:relative;top:3px;",
  1305. },
  1306. on: {
  1307. click: (e) => {
  1308. // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
  1309. // row.imgs = res.data
  1310. let list = [];
  1311. row.url.forEach((el) => {
  1312. list.push({ img_url: el });
  1313. });
  1314. this.$previewImg({
  1315. list,
  1316. baseUrl: this.$store.state.ip,
  1317. baseImgField: "img_url",
  1318. baseTitleField: "",
  1319. });
  1320. // })
  1321. },
  1322. },
  1323. });
  1324. },
  1325. },
  1326. {
  1327. title: "左右式",
  1328. key: "left_right_mode",
  1329. align: "center",
  1330. tooltip: true,
  1331. minWidth: 80,
  1332. render: (h, params) => {
  1333. return h(
  1334. "span",
  1335. {},
  1336. params.row.left_right_mode == 1
  1337. ? "左式"
  1338. : params.row.left_right_mode == 2
  1339. ? "右式"
  1340. : ""
  1341. );
  1342. },
  1343. },
  1344. {
  1345. title: "图号",
  1346. key: "url_number",
  1347. align: "center",
  1348. tooltip: true,
  1349. minWidth: 80,
  1350. },
  1351. ...arr,
  1352. { title: "备注", key: "remark", align: "center", minWidth: 80 },
  1353. {
  1354. title: "是否下深化",
  1355. key: "sub_state",
  1356. align: "center",
  1357. minWidth: 80,
  1358. render: (h, params) => {
  1359. return h("span", {}, params.row.sub_state == 1 ? "是" : "否");
  1360. },
  1361. },
  1362. {
  1363. title: "操作",
  1364. key: "set",
  1365. align: "center",
  1366. minWidth: 100,
  1367. slot: "set",
  1368. },
  1369. ];
  1370. // 订单特殊字段
  1371. this.formData.special &&
  1372. this.formData.special.forEach((element) => {
  1373. this.formData.head[1].forEach((item) => {
  1374. if (element.head_id == item.id) {
  1375. element = Object.assign(element, item);
  1376. this.contactSpecValueList.push(element);
  1377. }
  1378. });
  1379. });
  1380. this.contactForm = this.formData.head[1] ? this.formData.head[1] : [];
  1381. // 区域特殊字段
  1382. this.formData.list.forEach((element, index) => {
  1383. element.special &&
  1384. element.special.forEach((ele) => {
  1385. this.formData.head[2].forEach((item) => {
  1386. if (ele.head_id == item.id) {
  1387. ele = Object.assign(ele, item);
  1388. this.areaSpecValueList.push(ele);
  1389. }
  1390. });
  1391. });
  1392. // if (index == 0) {
  1393. // element.isCurrencyArea = true;
  1394. // //编辑进入页面是展示第一条区域的产品
  1395. // element.id &&
  1396. // this.axios
  1397. // .get("/api/order_area_list_product", {
  1398. // params: {
  1399. // order_no: this.$route.query.order_no,
  1400. // area_id: element.id,type:1
  1401. // },
  1402. // })
  1403. // .then((res) => {
  1404. // if (res.code == 200) {
  1405. // if (!element.product) {
  1406. // element.product = [];
  1407. // }
  1408. // element.product = res.data;
  1409. // element.product.forEach((pdt, index) => {
  1410. // if (!pdt.url) {
  1411. // pdt.url = [];
  1412. // }
  1413. // pdt.index = index + 1;
  1414. // pdt.special &&
  1415. // pdt.special.length > 0 &&
  1416. // pdt.special.forEach((_pdt) => {
  1417. // this.formData.head[3].forEach((element) => {
  1418. // if (_pdt.head_id == element.id) {
  1419. // _pdt = Object.assign(_pdt, element);
  1420. // pdt[_pdt.key] = _pdt.value;
  1421. // this.productSpecValueList.push(_pdt);
  1422. // }
  1423. // });
  1424. // });
  1425. // });
  1426. // this.$forceUpdate();
  1427. // }
  1428. // });
  1429. // } else {
  1430. // element.isCurrencyArea = false;
  1431. // }
  1432. });
  1433. this.areaSpecValueList = this.formData.head[2]
  1434. ? this.formData.head[2]
  1435. : [];
  1436. this.productSpecValueList = this.formData.head[3]
  1437. ? this.formData.head[3]
  1438. : [];
  1439. }
  1440. });
  1441. },
  1442. //项目辅料删除
  1443. handleSupSet(row, index) {
  1444. this.supTableData.splice(index, 1);
  1445. // this.supTableData.forEach((element, index) => {
  1446. // element.index = index + 1
  1447. // });
  1448. },
  1449. goback() {
  1450. this.$router.go(-1);
  1451. },
  1452. looks(img) {
  1453. const array = [{ img_url: img }];
  1454. this.$previewImg({
  1455. list: array,
  1456. baseUrl: this.$store.state.ip,
  1457. baseImgField: "img_url",
  1458. baseTitleField: "",
  1459. });
  1460. },
  1461. delItems(n, arr) {
  1462. arr.splice(n, 1);
  1463. },
  1464. changeIpt(e, row) {
  1465. let file = e.target.files[0];
  1466. this.postImg(file, row);
  1467. e.target.value = null;
  1468. },
  1469. postImg(file, row) {
  1470. let formData = new FormData();
  1471. formData.append("file", file);
  1472. this.axios.post("/api/upload_pic", formData).then((res) => {
  1473. this.$nextTick(() => {
  1474. row.push(res.data.url);
  1475. this.$forceUpdate();
  1476. });
  1477. });
  1478. },
  1479. // 添加特殊字段
  1480. handleAddInputConfirm() {
  1481. this.formData.special = JSON.parse(
  1482. JSON.stringify(this.contactSpecValueList)
  1483. );
  1484. this.formData.list.forEach((element) => {
  1485. element.special = JSON.parse(JSON.stringify(this.areaSpecValueList));
  1486. element.product.forEach((ele) => {
  1487. ele.special = JSON.parse(JSON.stringify(this.productSpecValueList));
  1488. });
  1489. });
  1490. let arr = [];
  1491. this.productSpecValueList.forEach((element) => {
  1492. arr.push({
  1493. title: element.key,
  1494. key: element.key,
  1495. align: "center",
  1496. minWidth: 80,
  1497. });
  1498. });
  1499. this.tableColumns = [
  1500. { type: "selection", align: "center", minWidth: 100 },
  1501. { title: "序号", key: "index", align: "center", minWidth: 80 },
  1502. {
  1503. title: "产品名称",
  1504. key: "title",
  1505. align: "center",
  1506. tooltip: true,
  1507. minWidth: 100,
  1508. },
  1509. { title: "数量", key: "num", align: "center", minWidth: 80 },
  1510. { title: "价格", key: "price", align: "center", minWidth: 80 },
  1511. {
  1512. title: "规格",
  1513. key: "measure",
  1514. align: "center",
  1515. tooltip: true,
  1516. minWidth: 140,
  1517. },
  1518. {
  1519. title: "工艺属性",
  1520. key: "process_property",
  1521. align: "center",
  1522. tooltip: true,
  1523. minWidth: 120,
  1524. },
  1525. {
  1526. title: "图纸",
  1527. align: "center",
  1528. key: "url",
  1529. minWidth: 100,
  1530. render: (h, params) => {
  1531. const { row } = params;
  1532. let url = row.url ? row.url : [];
  1533. return h("img", {
  1534. attrs: {
  1535. src: this.$store.state.ip + url[0],
  1536. style:
  1537. "max-width:50px;max-height:50px;position:relative;top:3px;",
  1538. },
  1539. on: {
  1540. click: (e) => {
  1541. // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
  1542. // row.imgs = res.data
  1543. let list = [];
  1544. row.url.forEach((el) => {
  1545. list.push({ img_url: el });
  1546. });
  1547. this.$previewImg({
  1548. list,
  1549. baseUrl: this.$store.state.ip,
  1550. baseImgField: "img_url",
  1551. baseTitleField: "",
  1552. });
  1553. // })
  1554. },
  1555. },
  1556. });
  1557. },
  1558. },
  1559. {
  1560. title: "左右式",
  1561. key: "left_right_mode",
  1562. align: "center",
  1563. tooltip: true,
  1564. minWidth: 80,
  1565. render: (h, params) => {
  1566. return h(
  1567. "span",
  1568. {},
  1569. params.row.left_right_mode == 1
  1570. ? "左式"
  1571. : params.row.left_right_mode == 2
  1572. ? "右式"
  1573. : ""
  1574. );
  1575. },
  1576. },
  1577. {
  1578. title: "图号",
  1579. key: "url_number",
  1580. align: "center",
  1581. tooltip: true,
  1582. minWidth: 80,
  1583. },
  1584. ...arr,
  1585. { title: "备注", key: "remark", align: "center", minWidth: 80 },
  1586. {
  1587. title: "是否下深化",
  1588. key: "sub_state",
  1589. align: "center",
  1590. minWidth: 80,
  1591. render: (h, params) => {
  1592. return h("span", {}, params.row.sub_state == 1 ? "是" : "否");
  1593. },
  1594. },
  1595. {
  1596. title: "操作",
  1597. key: "set",
  1598. align: "center",
  1599. minWidth: 100,
  1600. slot: "set",
  1601. },
  1602. ];
  1603. this.showAddInputModal = false;
  1604. },
  1605. // 添加特殊字段
  1606. handleSpecValueAdd(item, type) {
  1607. switch (type) {
  1608. case 1:
  1609. this.contactSpecValueList.push({ key: "", value: "" });
  1610. break;
  1611. case 2:
  1612. this.areaSpecValueList.push({ key: "", value: "" });
  1613. break;
  1614. case 3:
  1615. this.productSpecValueList.push({ key: "", value: "" });
  1616. break;
  1617. }
  1618. },
  1619. // 删除特殊字段
  1620. handleSpecValueDele(index, type) {
  1621. switch (type) {
  1622. case 1:
  1623. this.contactSpecValueList.splice(index, 1);
  1624. break;
  1625. case 2:
  1626. this.areaSpecValueList.splice(index, 1);
  1627. break;
  1628. case 3:
  1629. this.productSpecValueList.splice(index, 1);
  1630. break;
  1631. }
  1632. },
  1633. getListData() {
  1634. this.axios
  1635. .get("/api/order_area_detail_list?", {
  1636. params: {
  1637. order_no: this.$route.query.order_no,
  1638. ...this.searchData,
  1639. type: 1,
  1640. },
  1641. })
  1642. .then((res) => {
  1643. this.listTableData = res.data.data;
  1644. this.area_no_list = res.data.area_no;
  1645. this.area_title_list = res.data.area_title;
  1646. this.product_title_list = res.data.product_title;
  1647. this.url_number_list = res.data.url_number;
  1648. this.listTableData.map((item) => {
  1649. !item.url && (item.url = []);
  1650. res.data.imgs.map((element) => {
  1651. if (item.sign_id == element.sign_id) {
  1652. item.url.push({ img_url: element.img_url });
  1653. }
  1654. });
  1655. });
  1656. this.total = res.data.total;
  1657. this.$forceUpdate();
  1658. });
  1659. },
  1660. handleCurTabChange(name) {
  1661. this.currencyTab = name;
  1662. if (name == "name2" && this.listTableData.length < 1) {
  1663. this.getListData();
  1664. }
  1665. },
  1666. handleSelection(selection) {
  1667. this.selected = selection;
  1668. },
  1669. handleOpenModal() {
  1670. if (this.selected.length < 1) {
  1671. this.$Message.warning("请选择数据");
  1672. } else {
  1673. this.processModal = true;
  1674. }
  1675. },
  1676. handleRowDeep(row) {
  1677. (this.selected = [row]), (this.processModal = true);
  1678. },
  1679. handleProcess() {
  1680. if (this.process_man) {
  1681. let flag = true;
  1682. this.selected.map((item) => {
  1683. if (item.sub_state > 1) {
  1684. flag = false;
  1685. }
  1686. });
  1687. if (!flag) {
  1688. this.$Message.warning("选择数据中存在已下深化产品,请重新选择");
  1689. } else {
  1690. const order_area_product_id = this.selected.map(
  1691. (item) => item.order_area_product_id || item.id
  1692. );
  1693. this.axios({
  1694. method: "get",
  1695. url: "/api/order_area_detail_pull",
  1696. params: {
  1697. order_no: this.order_no,
  1698. type: 1,
  1699. sub_state: 1,
  1700. order_area_product_id,
  1701. process_man: this.process_man,
  1702. process_start_time: this.process_start_time
  1703. ? this.func.replaceDateNoHMS(this.process_start_time)
  1704. : "",
  1705. process_end_time: this.process_end_time
  1706. ? this.func.replaceDateNoHMS(this.process_end_time)
  1707. : "",
  1708. },
  1709. }).then((res) => {
  1710. if (res.code == 200) {
  1711. this.$Message.success(res.msg);
  1712. this.selected = [];
  1713. this.processModal = false;
  1714. this.getListData();
  1715. this.initData(this.$route.query.order_no);
  1716. }
  1717. });
  1718. }
  1719. } else {
  1720. this.$Message.warning("请选择人员");
  1721. }
  1722. },
  1723. changePage(e) {
  1724. this.page_index = e;
  1725. this.getListData();
  1726. },
  1727. changeSize(e) {
  1728. this.page_size = e;
  1729. this.getListData();
  1730. },
  1731. handleHiddenCurrencyArea(item, index) {
  1732. item.isCurrencyArea = false;
  1733. this.$forceUpdate();
  1734. },
  1735. // 展示区域产品
  1736. handleShowCurrencyArea(item, index) {
  1737. const preObj = this.formData.list.filter((item) => item.isCurrencyArea);
  1738. if (preObj.length > 0) {
  1739. // 1.1移除上一个展开区域及产品
  1740. this.formData.list.forEach((element) => {
  1741. element.product = [];
  1742. if (element.id == preObj[0].id) {
  1743. element.isCurrencyArea = false;
  1744. }
  1745. });
  1746. // 2.获取当前展开区域及产品
  1747. item.isCurrencyArea = true;
  1748. this.axios
  1749. .get("/api/order_area_list_product", {
  1750. params: {
  1751. order_no: this.$route.query.order_no,
  1752. area_id: item.id,
  1753. type: 1,
  1754. },
  1755. })
  1756. .then((res) => {
  1757. if (res.code == 200) {
  1758. if (!item.product) {
  1759. item.product = [];
  1760. }
  1761. item.product = res.data;
  1762. let flag = true;
  1763. item.product.forEach((pdt, index) => {
  1764. pdt.index = index + 1;
  1765. pdt.special &&
  1766. pdt.special.length > 0 &&
  1767. pdt.special.forEach((element) => {
  1768. this.formData.head[3].forEach((item) => {
  1769. if (element.head_id == item.id) {
  1770. element = Object.assign(element, item);
  1771. pdt[element.key] = element.value;
  1772. this.productSpecValueList.push(element);
  1773. }
  1774. });
  1775. });
  1776. // 是否已全部下深化
  1777. if (pdt.sub_state != 1) {
  1778. flag = false;
  1779. }
  1780. });
  1781. item.isAllDeeped = flag;
  1782. this.$forceUpdate();
  1783. }
  1784. });
  1785. } else {
  1786. // 2.获取当前展开区域及产品
  1787. item.isCurrencyArea = true;
  1788. this.axios
  1789. .get("/api/order_area_list_product", {
  1790. params: {
  1791. order_no: this.$route.query.order_no,
  1792. area_id: item.id,
  1793. type: 1,
  1794. },
  1795. })
  1796. .then((res) => {
  1797. if (res.code == 200) {
  1798. if (!item.product) {
  1799. item.product = [];
  1800. }
  1801. item.product = res.data;
  1802. let flag = true;
  1803. item.product.forEach((pdt, index) => {
  1804. pdt.index = index + 1;
  1805. pdt.special &&
  1806. pdt.special.length > 0 &&
  1807. pdt.special.forEach((element) => {
  1808. this.formData.head[3].forEach((item) => {
  1809. if (element.head_id == item.id) {
  1810. element = Object.assign(element, item);
  1811. pdt[element.key] = element.value;
  1812. this.productSpecValueList.push(element);
  1813. }
  1814. });
  1815. });
  1816. // 是否已全部下深化
  1817. if (pdt.sub_state != 1) {
  1818. flag = false;
  1819. }
  1820. });
  1821. item.isAllDeeped = flag;
  1822. this.$forceUpdate();
  1823. }
  1824. });
  1825. }
  1826. },
  1827. },
  1828. // 监听属性 类似于data概念
  1829. computed: {},
  1830. // 监控data中的数据变化
  1831. watch: {},
  1832. beforeCreate() {}, // 生命周期 - 创建之前
  1833. beforeMount() {}, // 生命周期 - 挂载之前
  1834. beforeUpdate() {}, // 生命周期 - 更新之前
  1835. updated() {}, // 生命周期 - 更新之后
  1836. beforeDestroy() {}, // 生命周期 - 销毁之前
  1837. destroyed() {}, // 生命周期 - 销毁完成
  1838. activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
  1839. };
  1840. </script>
  1841. <style lang="scss" scoped>
  1842. .BidSystemContractInfo {
  1843. overflow: hidden;
  1844. overflow-y: auto;
  1845. position: relative;
  1846. top: 20px;
  1847. height: 85%;
  1848. padding-bottom: 20px;
  1849. }
  1850. .footer-center {
  1851. display: flex;
  1852. justify-content: center;
  1853. padding: 10px 0;
  1854. }
  1855. .top_search {
  1856. padding: 20px 0;
  1857. width: 100%;
  1858. .top_search_form {
  1859. // width: 800px;
  1860. // display: flex;
  1861. // justify-content: space-around;
  1862. /deep/ .ivu-form-item {
  1863. display: inline-block;
  1864. width: 300px;
  1865. }
  1866. }
  1867. }
  1868. .addArea {
  1869. position: relative;
  1870. padding: 15px;
  1871. margin: 5px;
  1872. margin-bottom: 30px;
  1873. border-radius: 5px;
  1874. box-shadow: 1px 1px 5px 1px #999;
  1875. .addAreaBtn {
  1876. position: absolute;
  1877. right: 20px;
  1878. top: 20px;
  1879. }
  1880. /deep/ .ivu-form-item {
  1881. display: inline-block;
  1882. width: 220px;
  1883. }
  1884. }
  1885. .addPDTFormModal {
  1886. .addPDTForm {
  1887. width: 100%;
  1888. position: relative;
  1889. border-bottom: 1px solid #e8eaec;
  1890. margin-bottom: 30px;
  1891. /deep/ .ivu-form-item {
  1892. display: inline-block;
  1893. width: 300px;
  1894. }
  1895. .addPDTBtn {
  1896. position: absolute;
  1897. right: 10px;
  1898. bottom: 25px;
  1899. }
  1900. }
  1901. /deep/ .ivu-modal-body {
  1902. // display: flex;
  1903. // justify-content: center;
  1904. // flex-wrap: wrap;
  1905. max-height: 700px;
  1906. overflow: hidden;
  1907. overflow-y: auto;
  1908. }
  1909. }
  1910. .addPDTProcess {
  1911. width: 300px;
  1912. padding-bottom: 15px;
  1913. div {
  1914. display: flex;
  1915. justify-content: space-around;
  1916. padding: 5px 0;
  1917. span {
  1918. padding-top: 6px;
  1919. }
  1920. }
  1921. .dele_icon {
  1922. width: 10px;
  1923. /deep/ .ivu-icon {
  1924. padding-top: 5px;
  1925. }
  1926. }
  1927. }
  1928. .product-img {
  1929. padding-top: 10px;
  1930. }
  1931. .product-add {
  1932. display: flex;
  1933. flex-wrap: wrap;
  1934. .ipt {
  1935. position: absolute;
  1936. width: 100%;
  1937. height: 100%;
  1938. opacity: 0;
  1939. cursor: pointer;
  1940. outline: none;
  1941. top: 0;
  1942. left: 0;
  1943. }
  1944. .add-items {
  1945. width: 40px;
  1946. height: 40px;
  1947. border: 1px dotted #e7e7e7;
  1948. border-radius: 5px;
  1949. display: flex;
  1950. justify-content: center;
  1951. align-items: center;
  1952. overflow: hidden;
  1953. position: relative;
  1954. flex-direction: column;
  1955. background: #f4f5f7;
  1956. .item {
  1957. width: 46px;
  1958. height: 46px;
  1959. background: #3764ff;
  1960. opacity: 0.6;
  1961. display: flex;
  1962. justify-content: center;
  1963. align-items: center;
  1964. border-radius: 50%;
  1965. color: #fff;
  1966. }
  1967. }
  1968. .items {
  1969. width: 40px;
  1970. height: 40px;
  1971. margin-bottom: 10px;
  1972. display: flex;
  1973. justify-content: center;
  1974. align-items: center;
  1975. background: #e7e7e7;
  1976. margin-right: 10px;
  1977. border-radius: 5px;
  1978. position: relative;
  1979. img {
  1980. max-width: 40px;
  1981. max-height: 40px;
  1982. }
  1983. }
  1984. }
  1985. .supModalBtn {
  1986. display: flex;
  1987. justify-content: flex-end;
  1988. margin-bottom: 10px;
  1989. }
  1990. /deep/.ivu-modal-body {
  1991. // display: flex;
  1992. // justify-content: center;
  1993. .addInputClass {
  1994. display: flex;
  1995. justify-content: center;
  1996. width: 500px;
  1997. .dele_icon {
  1998. cursor: pointer;
  1999. width: 10px;
  2000. /deep/ .ivu-icon {
  2001. padding-top: 5px;
  2002. }
  2003. }
  2004. }
  2005. }
  2006. .addInputClassTab {
  2007. display: flex;
  2008. justify-content: center;
  2009. align-items: center;
  2010. flex-wrap: wrap;
  2011. div {
  2012. display: flex;
  2013. justify-content: center;
  2014. align-items: center;
  2015. width: 100%;
  2016. padding: 5px;
  2017. .dele_icon {
  2018. i {
  2019. font-size: 20px;
  2020. }
  2021. }
  2022. }
  2023. }
  2024. /deep/.ivu-tabs-nav-scroll {
  2025. display: flex;
  2026. justify-content: center;
  2027. }
  2028. /deep/ .ivu-table-wrapper {
  2029. overflow: visible;
  2030. }
  2031. /deep/.ivu-table-fixed-body {
  2032. padding-bottom: 20px;
  2033. }
  2034. .process_modal {
  2035. display: flex;
  2036. justify-content: center;
  2037. align-items: center;
  2038. padding: 10px;
  2039. }
  2040. </style>