changeRecordDetail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. <template>
  2. <div class="changeDetail">
  3. <Toptitle title="变更记录详情">
  4. <slot name="titleButton">
  5. <Button
  6. type="primary"
  7. style="margin-right: 10px"
  8. >打印变更联系单</Button
  9. >
  10. <Button
  11. @click="goback()"
  12. type="primary"
  13. ghost
  14. style="margin-right: 10px"
  15. >返回</Button
  16. >
  17. </slot>
  18. </Toptitle>
  19. <div>
  20. <div class="form">
  21. <div class="form_content">
  22. <div class="top_search">
  23. <div><span>区域编码:</span>{{ formData.area_num }}</div>
  24. <div><span>区域名称:</span>{{ formData.area_title }}</div>
  25. <div><span>产品名称:</span>{{ formData.product_title }}</div>
  26. <div><span>数量:</span>{{ formData.product_num }}</div>
  27. <div><span>规格:</span>{{ formData.measure }}</div>
  28. <div><span>工艺属性:</span>{{ formData.process_property }}</div>
  29. <div><span>图号:</span>{{ formData.url_number }}</div>
  30. <div style="display:flex;">
  31. <span style="width:50px">图纸:</span>
  32. <div>
  33. <span
  34. v-for="item in formData.img"
  35. :key="item"
  36. @click="checkImg(formData.img)"
  37. >
  38. <img :src="$store.state.ip + item" alt="" style=" max-width: 80px; max-height: 80px;"/>
  39. </span>
  40. </div>
  41. </div>
  42. <div>
  43. <span>左右式:</span
  44. >{{
  45. formData.fashion == 1
  46. ? "左式"
  47. : formData.fashion == 2
  48. ? "右式"
  49. : "无"
  50. }}
  51. </div>
  52. <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
  53. <div><span>备注:</span>{{ formData.remark }}</div>
  54. </div>
  55. </div>
  56. <div class="form_middle">
  57. <Form class="form_middle_content" :label-width="100">
  58. <FormItem label="联系单编号:">
  59. <span>{{formData.contact_order_no}}</span>
  60. </FormItem>
  61. <FormItem label="原生产单编号:">
  62. <span
  63. style="width: auto"
  64. >{{this.$route.query.order_no}}</span>
  65. </FormItem>
  66. <FormItem label="接收部门:">
  67. <Select
  68. filterable
  69. clearable
  70. v-model="formData.get_depart_id"
  71. size="small"
  72. style="width: 120px"
  73. disabled
  74. >
  75. <Option
  76. v-for="(item,index) in depart_list"
  77. :key="index"
  78. :label="item.title"
  79. :value="item.id"
  80. ></Option>
  81. </Select>
  82. </FormItem>
  83. <FormItem label="发出部门:">
  84. <Select
  85. filterable
  86. clearable
  87. v-model="formData.send_depart_id"
  88. disabled
  89. size="small"
  90. style="width: 120px"
  91. >
  92. <Option
  93. v-for="(item, index) in depart_list"
  94. :key="index"
  95. :label="item.title"
  96. :value="item.id"
  97. ></Option>
  98. </Select>
  99. </FormItem>
  100. <FormItem label="更改性质:">
  101. <Input placeholder="请输入..." style="width: auto" v-model="formData.type_title" disabled></Input>
  102. </FormItem>
  103. <FormItem label="变更原因:">
  104. <Input
  105. type="textarea"
  106. placeholder="请输入..."
  107. style="width: auto"
  108. v-model="formData.reason"
  109. disabled
  110. ></Input>
  111. </FormItem>
  112. </Form>
  113. </div>
  114. </div>
  115. </div>
  116. <Card style="width: 100%">
  117. <div style="margin-left: 5px">
  118. <span style="font-size: 20px; font-weight: bold">变更后深化单内容</span>
  119. </div>
  120. <Table :columns="tableColumns" :data="tableData" border>
  121. <template slot="urlSet" slot-scope="{ index }">
  122. <div class="product-img">
  123. <div class="product-add">
  124. <div
  125. class="items"
  126. v-show="tableData[index].img.length !== 0 ? true : false"
  127. >
  128. <img
  129. @click="looks(tableData[index].img)"
  130. v-for="(el, idx) in tableData[index].img"
  131. :key="idx"
  132. :src="$store.state.ip + el"
  133. alt=""
  134. />
  135. </div>
  136. </div>
  137. </div>
  138. </template>
  139. </Table>
  140. <div class="List_form_content">
  141. <div>
  142. <span style="font-size: 20px; font-weight: bold">原深化单内容</span>
  143. </div>
  144. <Table :columns="ListColumns" :data="ListData" border>
  145. <template slot="urlSet" slot-scope="{ index }">
  146. <div
  147. class="items"
  148. >
  149. <img
  150. @click="looks(ListData[index].img)"
  151. v-for="(el, idx) in ListData[index].img"
  152. :key="idx"
  153. :src="$store.state.ip + el"
  154. alt=""
  155. style="max-width: 40px; max-height: 40px"
  156. />
  157. </div>
  158. </template>
  159. </Table>
  160. </div>
  161. </Card>
  162. </div>
  163. </template>
  164. <script>
  165. export default {
  166. data() {
  167. return {
  168. formData: {
  169. depart_end:'',
  170. depart_start:'',
  171. msg:'',
  172. contact_order_no:'',
  173. change_type:''
  174. },
  175. cascader_list: [],
  176. building_list: [],
  177. type: 1,
  178. tableColumns: [
  179. { title: "序号", align: "center", minWidth: 100, type: "index" },
  180. {
  181. title: "楼栋",
  182. key: "house",
  183. align: "center",
  184. minWidth: 100
  185. },
  186. {
  187. title: "楼单元",
  188. key: "unit",
  189. align: "center",
  190. minWidth: 100
  191. },
  192. {
  193. title: "楼层",
  194. key: "layer",
  195. align: "center",
  196. minWidth: 100
  197. },
  198. {
  199. title: "房间号",
  200. key: "number",
  201. align: "center",
  202. minWidth: 100
  203. },
  204. {
  205. title: "产品分类",
  206. key: "type_title",
  207. align: "center",
  208. minWidth: 100
  209. },
  210. {
  211. title: "产品",
  212. key: "title",
  213. align: "center",
  214. minWidth: 100
  215. },
  216. {
  217. title: "计量单位",
  218. key: "product_unit",
  219. align: "center",
  220. minWidth: 100
  221. },
  222. {
  223. title: "位置",
  224. key: "position",
  225. align: "center",
  226. minWidth: 100
  227. },
  228. {
  229. title: "图纸",
  230. key: "url",
  231. align: "center",
  232. minWidth: 100,
  233. slot: "urlSet"
  234. },
  235. {
  236. title: "图号",
  237. key: "url_number",
  238. align: "center",
  239. minWidth: 100
  240. },
  241. {
  242. title: "型号",
  243. key: "model",
  244. align: "center",
  245. minWidth: 100
  246. },
  247. {
  248. title: "长",
  249. key: "long",
  250. align: "center",
  251. minWidth: 100
  252. },
  253. {
  254. title: "宽",
  255. key: "wide",
  256. align: "center",
  257. minWidth: 100
  258. },
  259. {
  260. title: "高",
  261. key: "high",
  262. align: "center",
  263. minWidth: 100
  264. }
  265. ],
  266. tableData: [],
  267. ListColumns: [
  268. { title: "序号", align: "center", minWidth: 100, type: "index" },
  269. { title: "楼栋", key: "house", align: "center", minWidth: 100 },
  270. { title: "楼单元", key: "unit", align: "center", minWidth: 100 },
  271. { title: "楼层", key: "layer", align: "center", minWidth: 100 },
  272. { title: "房价号", key: "number", align: "center", minWidth: 100 },
  273. {
  274. title: "产品分类",
  275. key: "type_title",
  276. align: "center",
  277. minWidth: 100,
  278. },
  279. { title: "产品", key: "title", align: "center", minWidth: 100 },
  280. {
  281. title: "计量单位",
  282. key: "product_unit",
  283. align: "center",
  284. minWidth: 100,
  285. },
  286. { title: "位置", key: "position", align: "center", minWidth: 100 },
  287. {
  288. title: "图纸",
  289. key: "url",
  290. align: "center",
  291. minWidth: 100,
  292. slot: "urlSet",
  293. },
  294. { title: "图号", key: "url_number", align: "center", minWidth: 100 },
  295. { title: "型号", key: "model", align: "center", minWidth: 100 },
  296. { title: "长", key: "long", align: "center", minWidth: 100 },
  297. { title: "宽", key: "wide", align: "center", minWidth: 100 },
  298. { title: "高", key: "high", align: "center", minWidth: 100 }
  299. ],
  300. ListData: [],
  301. page_index: 1,
  302. page_size: 10,
  303. depart_list:[],
  304. show:false
  305. };
  306. },
  307. created(){
  308. this.axios.get("/api/basics_product_index").then((res) => {
  309. this.cascader_list = res.data.data;
  310. });
  311. this.axios.get('/api/employee_depart_list').then(res=>{
  312. this.depart_list = res.data
  313. let arr = [];
  314. this.depart_list.forEach(item=>{
  315. if(item.sub.length == 0){
  316. arr.push(item)
  317. }
  318. else{
  319. item.sub.forEach(_item=>{
  320. arr.push(_item)
  321. })
  322. }
  323. })
  324. this.depart_list =arr
  325. })
  326. },
  327. mounted() {
  328. this.initData(
  329. this.$route.query.contact_order_no
  330. );
  331. },
  332. methods: {
  333. looks(arr) {
  334. // const array = [{ img_url: img }];
  335. const array = arr.map((v) => {
  336. return { img_url: v };
  337. });
  338. this.$previewImg({
  339. list: array,
  340. baseUrl: this.$store.state.ip,
  341. baseImgField: "img_url",
  342. baseTitleField: "",
  343. });
  344. },
  345. goback() {
  346. this.$router.go(-1);
  347. },
  348. initData(contact_order_no) {
  349. this.axios({
  350. method: "get",
  351. url: "/api/change_area_product_detail",
  352. params: {
  353. contact_order_no
  354. },
  355. }).then((res) => {
  356. console.log(res);
  357. this.tableData = res.data.new_list;
  358. this.ListData =res.data.old_list;
  359. this.formData =res.data;
  360. this.tableData.forEach((item) => {
  361. item.long = item.measure.split("*")[0];
  362. item.wide = item.measure.split("*")[1];
  363. item.high = item.measure.split("*")[2];
  364. });
  365. this.ListData.forEach(item=>{
  366. item.long = item.measure.split("*")[0];
  367. item.wide = item.measure.split("*")[1];
  368. item.high = item.measure.split("*")[2];
  369. })
  370. });
  371. },
  372. },
  373. };
  374. </script>
  375. <style scoped lang='scss'>
  376. .changeDetail {
  377. overflow: auto;
  378. .form_content {
  379. border-bottom: 1px solid #a2a6b1;
  380. .top_search {
  381. display: flex;
  382. flex-wrap: wrap;
  383. div {
  384. width: 250px;
  385. font-size: 14px;
  386. margin: 10px 0px;
  387. }
  388. span{
  389. margin-left: 20px;
  390. }
  391. }
  392. .form_content_header {
  393. display: flex;
  394. flex-wrap: wrap;
  395. }
  396. }
  397. .form_middle {
  398. margin: 20px 0;
  399. .form_middle_content {
  400. display: flex;
  401. flex-wrap: wrap;
  402. }
  403. }
  404. }
  405. .product-add {
  406. display: flex;
  407. flex-direction: column;
  408. .ipt {
  409. position: absolute;
  410. width: 100%;
  411. height: 100%;
  412. opacity: 0;
  413. cursor: pointer;
  414. outline: none;
  415. top: 0;
  416. left: 0;
  417. }
  418. .items {
  419. width: auto;
  420. height: 40px;
  421. margin-bottom: 10px;
  422. overflow: hidden;
  423. border-radius: 5px;
  424. position: relative;
  425. img {
  426. max-width: 40px;
  427. max-height: 40px;
  428. }
  429. }
  430. }
  431. .List_form_content {
  432. margin: 30px 0;
  433. }
  434. .ivu-form-item{
  435. width: 250px;
  436. }
  437. </style>