infoDetail.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. <template>
  2. <div class="changeDetail">
  3. <Toptitle :title="type == 3 ? '生产拆单详情' : '生产拆单新增'">
  4. <slot name="titleButton">
  5. <Button type="primary" style="margin-right: 10px" v-if="type == 6"
  6. >开启拆单</Button
  7. >
  8. <Button type="primary" style="margin-right: 10px" v-if="type == 3"
  9. >批量下生产</Button
  10. >
  11. <Button
  12. @click="goback()"
  13. type="primary"
  14. ghost
  15. style="margin-right: 10px"
  16. >返回</Button
  17. >
  18. <Button
  19. type="primary"
  20. style="margin-right: 10px"
  21. v-if="type == 6"
  22. @click="save"
  23. >保存</Button
  24. >
  25. </slot>
  26. </Toptitle>
  27. <div class="content">
  28. <div class="form">
  29. <Form class="form_content" :label-width="100">
  30. <FormItem label="项目编号:">
  31. <Input v-if="type == 6" v-model="saveData.order_no" placeholder="请输入项目编码"/>
  32. <span style="width: 120px" v-else>{{ formData.order_no }}</span>
  33. </FormItem>
  34. <FormItem label="项目名称:">
  35. <Input v-if="type == 6" v-model="saveData.residential_name" placeholder="请输入项目名称"/>
  36. <span v-else>{{ formData.residential_name }}</span>
  37. </FormItem>
  38. <FormItem label="项目简称:">
  39. <Input v-if="type == 6" v-model="saveData.abbreviation" placeholder="请输入项目简称"/>
  40. <span v-else>{{ formData.abbreviation }}</span>
  41. </FormItem>
  42. <FormItem label="客户名称:">
  43. <Select
  44. filterable
  45. clearable
  46. v-model="saveData.custom_title"
  47. v-if="type == 6"
  48. >
  49. <Option
  50. v-for="(item, index) in custom_title_list"
  51. :key="index"
  52. :label="item.title"
  53. :value="item.id"
  54. ></Option>
  55. </Select>
  56. <span v-else>{{ formData.custom_title }}</span>
  57. </FormItem>
  58. <FormItem label="紧急程度:">
  59. <Select
  60. clearable
  61. v-model="saveData.warning_state"
  62. v-if="type == 6"
  63. >
  64. <Option
  65. v-for="(item, index) in warning_state_list"
  66. :key="index"
  67. :label="item.title"
  68. :value="item.id"
  69. ></Option>
  70. </Select>
  71. <span v-else>{{ formData.warning_state }}</span>
  72. </FormItem>
  73. <FormItem label="项目定金:">
  74. <Input v-if="type == 6" v-model="saveData.front_money" placeholder="请输入项目定金"/>
  75. <span v-else>{{ formData.front_money }}</span>
  76. </FormItem>
  77. <FormItem label="详细地址:">
  78. <Input v-if="type == 6" v-model="saveData.address" placeholder="请输入详细地址"/>
  79. <span v-else>{{ formData.address }}</span>
  80. </FormItem>
  81. <FormItem label="手机号:">
  82. <Input v-if="type == 6" v-model="saveData.mobile" placeholder="请输入手机号"/>
  83. <span v-else>{{ formData.mobile }}</span>
  84. </FormItem>
  85. <FormItem label="开始日期:">
  86. <DatePicker
  87. type="date"
  88. v-model="saveData.start_time"
  89. placeholder="年/月/日"
  90. style="width: 150px"
  91. v-if="type == 6"
  92. ></DatePicker>
  93. <span v-else>{{ formData.start_time }}</span>
  94. </FormItem>
  95. <FormItem label="交付日期:">
  96. <DatePicker
  97. type="date"
  98. v-model="saveData.end_time"
  99. placeholder="年/月/日"
  100. style="width: 150px"
  101. v-if="type == 6"
  102. ></DatePicker>
  103. <span v-else>{{ formData.end_time }}</span>
  104. </FormItem>
  105. <FormItem label="业务员:">
  106. <Select
  107. filterable
  108. clearable
  109. v-model="saveData.nickname"
  110. v-if="type == 6"
  111. >
  112. <Option
  113. v-for="(item, index) in nickname_list"
  114. :key="index"
  115. :label="item.nickname"
  116. :value="item.id"
  117. ></Option>
  118. </Select>
  119. <span v-else>{{ formData.nickname }}</span>
  120. </FormItem>
  121. <FormItem label="备注:">
  122. <Input v-if="type == 6" v-model="saveData.remark" type="textarea" placeholder="请输入备注"/>
  123. <span v-else>{{ formData.remark }}</span>
  124. </FormItem>
  125. </Form>
  126. </div>
  127. <Card style="width: 100%" class="card">
  128. <div class="form_middle">
  129. <Form class="form_middle_content" :label-width="100">
  130. <FormItem label="区域编码:">
  131. <Select
  132. filterable
  133. multiple
  134. v-model="searchData.area_code"
  135. size="small"
  136. style="width: 120px"
  137. >
  138. <Option
  139. v-for="(item, index) in area_code"
  140. :key="index"
  141. :label="item.area_code"
  142. :value="item.area_code"
  143. ></Option>
  144. </Select>
  145. </FormItem>
  146. <FormItem label="区域名称:">
  147. <Select
  148. filterable
  149. multiple
  150. v-model="searchData.area_title"
  151. size="small"
  152. style="width: 120px"
  153. >
  154. <Option
  155. v-for="(item, index) in area_title"
  156. :key="index"
  157. :label="item.area_title"
  158. :value="item.area_title"
  159. ></Option>
  160. </Select>
  161. </FormItem>
  162. <FormItem label="户型:">
  163. <Select
  164. filterable
  165. multiple
  166. v-model="searchData.house_type"
  167. size="small"
  168. style="width: 120px"
  169. >
  170. <Option
  171. v-for="(item, index) in house_type"
  172. :key="index"
  173. :label="item.house_type"
  174. :value="item.house_type"
  175. ></Option>
  176. </Select>
  177. </FormItem>
  178. <FormItem label="楼栋:">
  179. <Select
  180. filterable
  181. multiple
  182. v-model="searchData.house"
  183. size="small"
  184. style="width: 120px"
  185. >
  186. <Option
  187. v-for="(item, index) in house"
  188. :key="index"
  189. :label="item.house"
  190. :value="item.house"
  191. ></Option>
  192. </Select>
  193. </FormItem>
  194. <FormItem label="单元:">
  195. <Select
  196. filterable
  197. multiple
  198. v-model="searchData.unit"
  199. size="small"
  200. style="width: 120px"
  201. >
  202. <Option
  203. v-for="(item, index) in unit"
  204. :key="index"
  205. :label="item.unit"
  206. :value="item.unit"
  207. ></Option>
  208. </Select>
  209. </FormItem>
  210. <FormItem label="楼层:">
  211. <Select
  212. filterable
  213. multiple
  214. v-model="searchData.layer"
  215. size="small"
  216. style="width: 120px"
  217. >
  218. <Option
  219. v-for="(item, index) in layer"
  220. :key="index"
  221. :label="item.layer"
  222. :value="item.layer"
  223. ></Option>
  224. </Select>
  225. </FormItem>
  226. <FormItem label="房号:">
  227. <Select
  228. filterable
  229. multiple
  230. v-model="searchData.number"
  231. size="small"
  232. style="width: 120px"
  233. >
  234. <Option
  235. v-for="(item, index) in number"
  236. :key="index"
  237. :label="item.number"
  238. :value="item.number"
  239. ></Option>
  240. </Select>
  241. </FormItem>
  242. <FormItem label="位置:">
  243. <Select
  244. filterable
  245. multiple
  246. v-model="searchData.position"
  247. size="small"
  248. style="width: 120px"
  249. >
  250. <Option
  251. v-for="(item, index) in position"
  252. :key="index"
  253. :label="item.position"
  254. :value="item.position"
  255. ></Option>
  256. </Select>
  257. </FormItem>
  258. <FormItem label="产品分类:">
  259. <Select
  260. filterable
  261. multiple
  262. v-model="searchData.product_type"
  263. size="small"
  264. style="width: 120px"
  265. >
  266. <Option
  267. v-for="(item, index) in product_type"
  268. :key="index"
  269. :label="item.product_type"
  270. :value="item.product_type"
  271. ></Option>
  272. </Select>
  273. </FormItem>
  274. <FormItem label="图号:">
  275. <Select
  276. filterable
  277. multiple
  278. v-model="searchData.url_number"
  279. size="small"
  280. style="width: 120px"
  281. >
  282. <Option
  283. v-for="(item, index) in url_number"
  284. :key="index"
  285. :label="item.url_number"
  286. :value="item.url_number"
  287. ></Option>
  288. </Select>
  289. </FormItem>
  290. <FormItem label="产品名称:">
  291. <Select
  292. filterable
  293. multiple
  294. v-model="searchData.product_title"
  295. size="small"
  296. style="width: 120px"
  297. >
  298. <Option
  299. v-for="(item, index) in product_title"
  300. :key="index"
  301. :label="item.product_title"
  302. :value="item.product_title"
  303. ></Option>
  304. </Select>
  305. </FormItem>
  306. <FormItem label="材质:">
  307. <Select
  308. filterable
  309. clearable
  310. v-model="searchData.material"
  311. size="small"
  312. style="width: 120px"
  313. >
  314. <Option
  315. v-for="(item, index) in material"
  316. :key="index"
  317. :label="item"
  318. :value="item"
  319. ></Option>
  320. </Select>
  321. </FormItem>
  322. <FormItem label="颜色:">
  323. <Select
  324. filterable
  325. clearable
  326. v-model="searchData.color"
  327. size="small"
  328. style="width: 120px"
  329. >
  330. <Option
  331. v-for="(item, index) in color"
  332. :key="index"
  333. :label="item"
  334. :value="item"
  335. ></Option>
  336. </Select>
  337. </FormItem>
  338. <FormItem label="工艺:">
  339. <Select
  340. filterable
  341. clearable
  342. v-model="searchData.work"
  343. size="small"
  344. style="width: 120px"
  345. >
  346. <Option
  347. v-for="(item, index) in work"
  348. :key="index"
  349. :label="item"
  350. :value="item"
  351. ></Option>
  352. </Select>
  353. </FormItem>
  354. <FormItem label="左右式:">
  355. <Select
  356. filterable
  357. multiple
  358. v-model="searchData.fashion"
  359. size="small"
  360. style="width: 120px"
  361. >
  362. <Option
  363. v-for="(item, index) in fashion"
  364. :key="index"
  365. :label="
  366. item.fashion === 0
  367. ? '无'
  368. : item.fashion === 1
  369. ? '左式'
  370. : '右式'
  371. "
  372. :value="item.fashion"
  373. ></Option>
  374. </Select>
  375. </FormItem>
  376. <FormItem label="拆单状态:">
  377. <Select
  378. filterable
  379. clearable
  380. v-model="searchData.state"
  381. size="small"
  382. style="width: 120px"
  383. >
  384. <Option
  385. v-for="(item, index) in state"
  386. :key="index"
  387. :label="item.state === 0 ? '未拆单' : '已拆单'"
  388. :value="item.state"
  389. ></Option>
  390. </Select>
  391. </FormItem>
  392. <FormItem>
  393. <Button
  394. @click="search"
  395. style="margin-right: 10px"
  396. type="primary"
  397. ghost
  398. >搜索</Button
  399. >
  400. </FormItem>
  401. </Form>
  402. </div>
  403. <Tabs type="card" @on-click="getData">
  404. <TabPane
  405. v-for="tab in tabs"
  406. :key="tab"
  407. :label="tab == 1 ? '汇总' : '明细'"
  408. style="margin: 0 auto"
  409. >
  410. <div v-show="tab === 1">
  411. <Table :columns="totalColumns" :data="totalData" border> </Table>
  412. <Page
  413. :page-size-opts="[10, 20, 30, 40, 100, 1000]"
  414. @on-page-size-change="changeTotalSize"
  415. @on-change="changeTotalPage"
  416. :current="page_index"
  417. show-total
  418. :total="total"
  419. show-sizer
  420. :page-size="page_size"
  421. style="text-align: center; margin-top: 10px"
  422. />
  423. </div>
  424. <div v-show="tab === 2">
  425. <Table :columns="detailColumns" :data="detailData" border>
  426. </Table>
  427. <Page
  428. :page-size-opts="[10, 20, 30, 40, 100, 1000]"
  429. @on-page-size-change="changeDetailSize"
  430. @on-change="changeDetailPage"
  431. :current="page_index"
  432. show-total
  433. :total="total"
  434. show-sizer
  435. :page-size="page_size"
  436. style="text-align: center; margin-top: 10px"
  437. />
  438. </div>
  439. </TabPane>
  440. <div slot="extra" class="upload">
  441. <Button
  442. @click="handleTabsAdd"
  443. size="small"
  444. style="margin-right: 10px"
  445. type="primary"
  446. ghost
  447. v-if="type == 6"
  448. >新增</Button
  449. >
  450. <Upload
  451. :headers="headers"
  452. :show-upload-list="false"
  453. :on-error="uploadError"
  454. :on-success="uploadSuccess"
  455. :action="$store.state.ip + '/api/explode_save_import_new'"
  456. v-if="type == 6"
  457. style="margin-right: 10px"
  458. >
  459. <Button
  460. size="small"
  461. type="primary"
  462. ghost
  463. >导入</Button
  464. >
  465. </Upload>
  466. </div>
  467. </Tabs>
  468. </Card>
  469. </div>
  470. </div>
  471. </template>
  472. <script>
  473. export default {
  474. data() {
  475. return {
  476. ruleValidate: {
  477. name: [
  478. { required: true, message: 'The name cannot be empty', trigger: 'blur' }
  479. ]},
  480. totalColumns: [
  481. { type: "selection", align: "center", width: 60 },
  482. { title: "序号", align: "center", type: "index", minWidth: 200 },
  483. {
  484. title: "产品分类",
  485. align: "center",
  486. key: "product_type",
  487. minWidth: 200,
  488. },
  489. {
  490. title: "产品名称",
  491. align: "center",
  492. key: "product_title",
  493. minWidth: 200,
  494. },
  495. { title: "图号", align: "center", key: "url_number", minWidth: 200 },
  496. { title: "型号", align: "center", key: "model", minWidth: 200 },
  497. { title: "数量", align: "center", key: "num", minWidth: 200 },
  498. { title: "长", align: "center", key: "long", minWidth: 200 },
  499. { title: "宽", align: "center", key: "wide", minWidth: 200 },
  500. { title: "高", align: "center", key: "high", minWidth: 200 },
  501. { title: "材质", align: "center", key: "material", minWidth: 200 },
  502. { title: "颜色", align: "center", key: "color", minWidth: 200 },
  503. { title: "工艺", align: "center", key: "work", minWidth: 200 },
  504. { title: "图纸", align: "center", key: "url", minWidth: 200 },
  505. { title: "左右式", align: "center", key: "fashion", minWidth: 200 },
  506. { title: "备注", align: "center", key: "remark", minWidth: 200 },
  507. { title: "拆单状态", align: "center", key: "state", minWidth: 200 },
  508. { title: "操作", align: "center", minWidth: 200 },
  509. ],
  510. totalData: [],
  511. headers: { Authorization: localStorage.getItem("token") },
  512. detailColumns: [
  513. { type: "selection", align: "center", width: 60 },
  514. { title: "序号", align: "center", type: "index", minWidth: 200 },
  515. { title: "区域编码", align: "center", key: "area_code", minWidth: 200 },
  516. {
  517. title: "区域名称",
  518. align: "center",
  519. key: "area_title",
  520. minWidth: 200,
  521. },
  522. { title: "户型", align: "center", key: "house_type", minWidth: 200 },
  523. { title: "楼栋", align: "center", key: "house", minWidth: 200 },
  524. { title: "单元", align: "center", key: "unit", minWidth: 200 },
  525. { title: "楼层", align: "center", key: "layer", minWidth: 200 },
  526. { title: "房号", align: "center", key: "number", minWidth: 200 },
  527. { title: "位置", align: "center", key: "position", minWidth: 200 },
  528. {
  529. title: "产品分类",
  530. align: "center",
  531. key: "product_type",
  532. minWidth: 200,
  533. },
  534. {
  535. title: "产品名称",
  536. align: "center",
  537. key: "product_title",
  538. minWidth: 200,
  539. },
  540. { title: "图号", align: "center", key: "url_number", minWidth: 200 },
  541. { title: "型号", align: "center", key: "model", minWidth: 200 },
  542. { title: "数量", align: "center", key: "num", minWidth: 200 },
  543. { title: "长", align: "center", key: "long", minWidth: 200 },
  544. { title: "宽", align: "center", key: "wide", minWidth: 200 },
  545. { title: "高", align: "center", key: "high", minWidth: 200 },
  546. { title: "材质", align: "center", key: "material", minWidth: 200 },
  547. { title: "颜色", align: "center", key: "color", minWidth: 200 },
  548. { title: "工艺", align: "center", key: "work", minWidth: 200 },
  549. { title: "图纸", align: "center", key: "url", minWidth: 200 },
  550. { title: "左右式", align: "center", key: "fashion", minWidth: 200 },
  551. { title: "备注", align: "center", key: "remark", minWidth: 200 },
  552. { title: "拆单状态", align: "center", key: "state", minWidth: 200 },
  553. { title: "操作", align: "center", minWidth: 200 },
  554. ],
  555. detailData: [],
  556. saveData: {
  557. abbreviation: "",
  558. address: "",
  559. custom_title: "",
  560. end_time: "",
  561. front_money: "",
  562. mobile: "",
  563. nickname: "",
  564. order_no: "",
  565. remark: "",
  566. residential_name: "",
  567. start_time: "",
  568. warning_state: "",
  569. },
  570. formData:{},
  571. custom_title_list:[],
  572. warning_state_list:[],
  573. nickname_list:[],
  574. searchData: {
  575. area_code: [],
  576. area_title: [],
  577. house_type: [],
  578. product_type: [],
  579. fashion: [],
  580. house: [],
  581. unit: [],
  582. layer: [],
  583. number: [],
  584. position: [],
  585. url_number: [],
  586. product_title: [],
  587. material: "",
  588. color: "",
  589. work: "",
  590. state: "",
  591. },
  592. area_code: [],
  593. area_title: [],
  594. house_type: [],
  595. house: [],
  596. unit: [],
  597. layer: [],
  598. number: [],
  599. position: [],
  600. url_number: [],
  601. product_title: [],
  602. product_type: [],
  603. fashion: [],
  604. material: [],
  605. color: [],
  606. work: [],
  607. state: [],
  608. search_state: false,
  609. copy_form: [],
  610. type: this.$route.query.type,
  611. formData: {},
  612. tabs: 2,
  613. total: 0,
  614. page_index: 1,
  615. page_size: 10,
  616. save_state:false,
  617. };
  618. },
  619. created() {
  620. if (this.$route.query.type == 3) {
  621. this.axios
  622. .get("/api/order_area_orders", {
  623. params: { order_no: this.$route.query.order_no },
  624. })
  625. .then((res) => {
  626. this.formData = res.msg;
  627. });
  628. this.getData();
  629. }else{
  630. this.axios.get('/api/custom_list').then(res=>{ this.custom_title_list = res.data.data});
  631. this.axios.get('/api/warning_list').then(res=>{ this.warning_state_list = res.data.data });
  632. this.axios.get('/api/employee_list').then(res=>{ this.nickname_list = res.data });
  633. }
  634. },
  635. methods: {
  636. changeTotalSize(e) {
  637. this.page_size = e;
  638. this.getData();
  639. },
  640. changeTotalPage(e) {
  641. this.page_index = e;
  642. this.getTotalData();
  643. },
  644. changeDetailSize(e) {
  645. this.page_size = e;
  646. this.getData(1);
  647. },
  648. changeDetailPage(e) {
  649. this.page_index = e;
  650. this.getData(1);
  651. },
  652. getData(type) {
  653. if (type === 1) {
  654. if (this.search_state) {
  655. this.page_index = 1;
  656. this.page_size = 10;
  657. this.axios
  658. .post("/api/order_area_details", {
  659. order_no: this.$route.query.order_no,
  660. page_index: this.page_index,
  661. page_size: this.page_size,
  662. ...this.searchData,
  663. })
  664. .then((res) => {
  665. console.log(res);
  666. this.detailData = res.msg.data;
  667. this.total = res.msg.total;
  668. });
  669. } else {
  670. this.page_index = 1;
  671. this.page_size = 10;
  672. this.axios
  673. .post("/api/order_area_details", {
  674. order_no: this.$route.query.order_no,
  675. page_index: this.page_index,
  676. page_size: this.page_size,
  677. })
  678. .then((res) => {
  679. console.log(res);
  680. this.detailData = res.msg.data;
  681. this.total = res.msg.total;
  682. });
  683. }
  684. } else if (type === 0) {
  685. // this.page_index= 1;
  686. // this.page_size = 10;
  687. // this.axios
  688. // .post("/api/order_area_details",
  689. // {
  690. // ...this.$route.query,
  691. // ...{ page_index: this.page_index, page_size: this.page_size },
  692. // ...this.searchData
  693. // },
  694. // )
  695. // .then((res) => {
  696. // this.totalData = res.msg.data;
  697. // this.total = res.msg.total;
  698. // })
  699. } else {
  700. this.page_index = 1;
  701. this.page_size = 10;
  702. this.axios
  703. .post("/api/order_area_details", {
  704. ...this.$route.query,
  705. ...{ page_index: this.page_index, page_size: this.page_size },
  706. ...this.searchData,
  707. })
  708. .then((res) => {
  709. console.log(res.msg.house_type,this.house_type)
  710. this.totalData = res.msg.data;
  711. this.total = res.msg.total;
  712. this.area_code = res.msg.area_code;
  713. this.area_title = res.msg.area_title;
  714. this.color = res.msg.color;
  715. this.fashion = res.msg.fashion;
  716. this.house = res.msg.house;
  717. this.house_type = res.msg.house_type;
  718. this.layer = res.msg.layer;
  719. this.material = res.msg.material;
  720. this.number = res.msg.number;
  721. this.position = res.msg.position;
  722. this.product_title = res.msg.product_title;
  723. this.product_type = res.msg.product_type;
  724. this.state = res.msg.state;
  725. this.unit = res.msg.unit;
  726. this.url_number = res.msg.url_number;
  727. this.work = res.msg.work;
  728. this.copy_form = this.searchData;
  729. });
  730. }
  731. },
  732. uploadError(err) {
  733. this.$Message.error(err.msg || "上传失败");
  734. },
  735. uploadSuccess(res) {
  736. if(this.save_state == true){
  737. if (res.code == 200) {
  738. this.$Message.success(res.msg || "上传成功");
  739. } else {
  740. this.$Message.warning(res.msg || "上传失败");
  741. }
  742. this.page_index = 1;
  743. this.page_size = 10;
  744. this.axios
  745. .post("/api/order_area_details", {
  746. ...this.$route.query,
  747. ...{ page_index: this.page_index, page_size: this.page_size },
  748. order_no:this.saveData.order_no
  749. })
  750. .then((res) => {
  751. console.log(res)
  752. this.totalData = res.msg.data;
  753. this.total = res.msg.total;
  754. this.area_code = res.msg.area_code;
  755. this.area_title = res.msg.area_title;
  756. this.color = res.msg.color;
  757. this.fashion = res.msg.fashion;
  758. this.house = res.msg.house;
  759. this.house_type = res.msg.house_type;
  760. this.layer = res.msg.layer;
  761. this.material = res.msg.material;
  762. this.number = res.msg.number;
  763. this.position = res.msg.position;
  764. this.product_title = res.msg.product_title;
  765. this.product_type = res.msg.product_type;
  766. this.state = res.msg.state;
  767. this.unit = res.msg.unit;
  768. this.url_number = res.msg.url_number;
  769. this.work = res.msg.work;
  770. this.copy_form = this.searchData;
  771. });
  772. }else{
  773. this.$message.error('请先保存!')
  774. }
  775. },
  776. save() {
  777. if(!this.saveData.order_no&&!this.saveData.residential_name&&!this.saveData.abbreviation&&!this.saveData.custom_title&&!this.saveData.warning_state){
  778. this.$message.error('请填写必要信息!');
  779. }else{
  780. this.axios.post('/api/order_area_save',{...this.saveData}).then(res=>{
  781. this.$message.success(res.msg)
  782. this.save_state = true;
  783. })
  784. }
  785. },
  786. goback() {
  787. this.$router.go(-1);
  788. },
  789. handleTabsAdd() {
  790. this.tabs++;
  791. },
  792. search() {
  793. this.search_state = true;
  794. this.getData();
  795. },
  796. },
  797. };
  798. </script>
  799. <style scoped lang='scss'>
  800. .changeDetail {
  801. .content {
  802. overflow: auto;
  803. height: 680px;
  804. .form_content {
  805. display: flex;
  806. flex-wrap: wrap;
  807. }
  808. .card {
  809. .form_middle {
  810. .form_middle_content {
  811. display: flex;
  812. flex-wrap: wrap;
  813. }
  814. }
  815. }
  816. }
  817. }
  818. .ivu-form-item{
  819. width: 250px;
  820. }
  821. .upload{
  822. display: flex;
  823. justify-content: space-around;
  824. }
  825. </style>