info.vue 63 KB

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