matchCheck.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <div>
  3. <Toptitle title="查看">
  4. <Button @click="back" type="primary" style="margin-right: 10px"
  5. >下生产</Button
  6. >
  7. <Button @click="back" type="primary" ghost style="margin-right: 10px"
  8. >返回</Button
  9. >
  10. </Toptitle>
  11. <div class="context-tabs">
  12. <Row type="flex" align="middle" style="padding:10px 0">
  13. <Col span="4">
  14. <span>图号:</span>
  15. <span>
  16. <Select
  17. filterable
  18. multiple
  19. filter-by-label
  20. transfer
  21. v-model="matchedInfo.image_number"
  22. :max-tag-count="2"
  23. size="small"
  24. style="width: 150px"
  25. >
  26. <Option
  27. v-for="(item, index) in urlMatchedList"
  28. :key="index"
  29. :label="item"
  30. :value="item"
  31. ></Option>
  32. </Select>
  33. </span>
  34. </Col>
  35. <Col span="4">
  36. <span>产品名称:</span>
  37. <span>
  38. <Select
  39. filterable
  40. multiple
  41. filter-by-label
  42. transfer
  43. v-model="matchedInfo.product_name"
  44. :max-tag-count="2"
  45. size="small"
  46. style="width: 150px"
  47. >
  48. <Option
  49. v-for="(item, index) in productMatchedList"
  50. :key="index"
  51. :label="item"
  52. :value="item"
  53. ></Option>
  54. </Select>
  55. </span>
  56. </Col>
  57. <Col span="2">
  58. <Button @click="back" size="small" type="primary">
  59. 搜索
  60. </Button>
  61. </Col>
  62. </Row>
  63. <div
  64. v-for="matched_info in matchedList"
  65. :key="matched_info.number"
  66. class="matched-block"
  67. >
  68. <Row>
  69. <Col span="2">
  70. <Checkbox v-model="matched_info.isSelect">全选</Checkbox>
  71. </Col>
  72. <Col span="2">
  73. <span>图号:{{ matched_info.image_number }}</span>
  74. </Col>
  75. <Col span="2">
  76. <span>产品名称:{{ matched_info.product_name }}</span>
  77. </Col>
  78. <Col span="2" offset="14">
  79. 总计
  80. <span style="color:red">{{ matched_info.num }}</span>
  81. 条数据
  82. </Col>
  83. <Col span="2">
  84. <Button
  85. @click="handleShowCurrencyMatched(matched_info)"
  86. size="small"
  87. type="text"
  88. >{{ matched_info.isCurrenct ? "收缩" : "展开" }}</Button
  89. >
  90. <Icon
  91. size="20"
  92. :type="
  93. matched_info.isCurrenct
  94. ? 'md-arrow-dropdown'
  95. : 'md-arrow-dropright'
  96. "
  97. style="vertical-align: middle;"
  98. />
  99. </Col>
  100. </Row>
  101. <Row style="margin-top:20px" v-if="matched_info.isCurrenct">
  102. <Col span="4">
  103. <span>区域名称:</span>
  104. <span>
  105. <Select
  106. filterable
  107. multiple
  108. transfer
  109. filter-by-label
  110. v-model="matchedInfo.region"
  111. :max-tag-count="2"
  112. size="small"
  113. style="width: 150px"
  114. >
  115. <Option
  116. v-for="(item, index) in regionMatchedList"
  117. :key="index"
  118. :label="item"
  119. :value="item"
  120. ></Option>
  121. </Select>
  122. </span>
  123. </Col>
  124. <Col span="4">
  125. <span>房号:</span>
  126. <span>
  127. <Select
  128. filterable
  129. multiple
  130. transfer
  131. filter-by-label
  132. v-model="matchedInfo.number"
  133. :max-tag-count="2"
  134. size="small"
  135. style="width: 150px"
  136. >
  137. <Option
  138. v-for="(item, index) in numberMatchedList"
  139. :key="index"
  140. :label="item"
  141. :value="item"
  142. ></Option>
  143. </Select>
  144. </span>
  145. </Col>
  146. <Col span="4">
  147. <span>部件名称:</span>
  148. <span>
  149. <Select
  150. filterable
  151. multiple
  152. transfer
  153. filter-by-label
  154. v-model="matchedInfo.part_name"
  155. :max-tag-count="2"
  156. size="small"
  157. style="width: 150px"
  158. >
  159. <Option
  160. v-for="(item, index) in partNameMatchedList"
  161. :key="index"
  162. :label="item"
  163. :value="item"
  164. ></Option>
  165. </Select>
  166. </span>
  167. </Col>
  168. <Col span="2">
  169. <Button @click="back" size="small" type="primary">
  170. 搜索
  171. </Button>
  172. </Col>
  173. </Row>
  174. <div v-if="matched_info.isCurrenct">
  175. <div
  176. v-for="(matched_detail, index) in matchedDetailList"
  177. :key="index"
  178. >
  179. <Row type="flex" align="middle">
  180. <Col span="10" style="padding:10px 0">
  181. <span>匹配信息:</span>
  182. <span>匹配信息:</span>
  183. <span>匹配信息:</span>
  184. <span>匹配信息:</span>
  185. <span>匹配信息:</span>
  186. </Col>
  187. </Row>
  188. <Table
  189. :columns="matchedSheetTableColumns"
  190. border
  191. :max-height="500"
  192. @on-selection-change="handleSelectChange"
  193. :data="matched_detail.detail"
  194. >
  195. </Table>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </template>
  202. <script>
  203. // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  204. // 例如:import 《组件名称》 from '《组件路径》';
  205. export default {
  206. name: "",
  207. components: {},
  208. props: {},
  209. // import引入的组件需要注入到对象中才能使用
  210. data() {
  211. // 这里存放数据
  212. return {
  213. matchedInfo: {
  214. image_number: "",
  215. product_name: "",
  216. region: [],
  217. number: [],
  218. part_name: [],
  219. },
  220. urlMatchedList: [],
  221. productMatchedList: [],
  222. regionMatchedList: [],
  223. numberMatchedList: [],
  224. partNameMatchedList: [],
  225. matchedList: [],
  226. matchedSheetTableColumns: [
  227. { title: "全选", align: "center", minWidth: 60, type: "selection" },
  228. { title: "序号", align: "center", type: "index", minWidth: 60 },
  229. { title: "区域名称", align: "center", key: "region", minWidth: 100 },
  230. { title: "房号", align: "center", key: "number", minWidth: 60 },
  231. { title: "部件名称", align: "center", key: "part_name", minWidth: 80 },
  232. { title: "行号", align: "center", key: "line", minWidth: 60 },
  233. { title: "木皮1", align: "center", key: "skin1", minWidth: 60 },
  234. {
  235. title: "原材料",
  236. align: "center",
  237. minWidth: 80,
  238. render: (h, params) => {
  239. return h("span", {}, params.row.board1 + params.row.board2);
  240. },
  241. },
  242. { title: "木皮2", align: "center", key: "skin2", minWidth: 80 },
  243. { title: "毛料尺寸", align: "center", key: "wool_size", minWidth: 80 },
  244. {
  245. title: "原料数量",
  246. align: "center",
  247. key: "wool_number",
  248. minWidth: 80,
  249. },
  250. { title: "精裁尺寸", align: "center", key: "cut_size", minWidth: 80 },
  251. {
  252. title: "零部件数量",
  253. align: "center",
  254. key: "cut_number",
  255. minWidth: 90,
  256. },
  257. { title: "贴皮面积", align: "center", key: "stick", minWidth: 80 },
  258. { title: "精裁面积", align: "center", key: "cut", minWidth: 80 },
  259. { title: "工艺要求", align: "center", key: "remark", minWidth: 80 },
  260. ], //匹配表头
  261. };
  262. },
  263. // 生命周期 - 创建完成(可以访问当前this实例)
  264. created() {},
  265. // 生命周期 - 挂载完成(可以访问DOM元素)
  266. mounted() {},
  267. methods: {
  268. back() {
  269. this.$router.go(-1);
  270. },
  271. handleShowCurrencyMatched() {},
  272. handleSelectChange(selection) {},
  273. },
  274. // 监听属性 类似于data概念
  275. computed: {},
  276. // 监控data中的数据变化
  277. watch: {},
  278. beforeCreate() {}, // 生命周期 - 创建之前
  279. beforeMount() {}, // 生命周期 - 挂载之前
  280. beforeUpdate() {}, // 生命周期 - 更新之前
  281. updated() {}, // 生命周期 - 更新之后
  282. beforeDestroy() {}, // 生命周期 - 销毁之前
  283. destroyed() {}, // 生命周期 - 销毁完成
  284. activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
  285. };
  286. </script>
  287. <style lang="scss" scoped>
  288. .context-tabs {
  289. position: relative;
  290. max-height: 650px;
  291. overflow: hidden;
  292. overflow-y: auto;
  293. padding: 15px;
  294. margin: 10px;
  295. margin-bottom: 30px;
  296. border-radius: 5px;
  297. box-shadow: 1px 1px 5px 1px #999;
  298. }
  299. .matched-block {
  300. padding: 15px;
  301. margin-bottom: 30px;
  302. background-color: #e9ecef;
  303. border-radius: 5px;
  304. }
  305. </style>