order.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <hc-new-card>
  3. <template #header>
  4. <hc-new-switch :datas="tabTab" :keys="tabKey" :round="false" size="default" @change="tabChange" />
  5. <div v-if="tabKey === 'key2'" class="ml-3 w-40">
  6. <el-select v-model="searchForm.key1" filterable block placeholder="选择工区">
  7. <el-option label="工区1" value="1" />
  8. <el-option label="工区2" value="2" />
  9. <el-option label="工区3" value="3" />
  10. </el-select>
  11. </div>
  12. </template>
  13. <template #extra>
  14. <el-button hc-btn type="primary" @click="addModalClick">
  15. <HcIcon name="add" />
  16. <span>新增</span>
  17. </el-button>
  18. <el-button hc-btn type="warning" @click="reportClick">
  19. <HcIcon name="send-plane-2" />
  20. <span>上报</span>
  21. </el-button>
  22. </template>
  23. <div class="relative h-full flex">
  24. <div :id="`hc_table_card_${uuid}`" class="flex-1">
  25. <hc-card-item>
  26. <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
  27. <template #action="{ row }">
  28. <el-link type="success" @click="rowEditClick(row)">修改</el-link>
  29. <el-link type="danger">删除</el-link>
  30. </template>
  31. </hc-table>
  32. <template #action>
  33. <hc-pages :pages="searchForm" @change="pageChange" />
  34. </template>
  35. </hc-card-item>
  36. </div>
  37. <div :id="`hc_info_card_${uuid}`">
  38. <el-scrollbar>
  39. <hc-card-item title="详情信息">
  40. <hc-info-table>
  41. <tr>
  42. <hc-info-table-td center is-title>变更方案编号:</hc-info-table-td>
  43. <hc-info-table-td width="120px">33</hc-info-table-td>
  44. <hc-info-table-td center is-title>变更方案名称:</hc-info-table-td>
  45. <hc-info-table-td width="120px">测试的</hc-info-table-td>
  46. <hc-info-table-td center is-title>变更发起单位:</hc-info-table-td>
  47. <hc-info-table-td width="120px">-</hc-info-table-td>
  48. </tr>
  49. <tr>
  50. <hc-info-table-td center is-title>业务日期:</hc-info-table-td>
  51. <hc-info-table-td width="160px">2022-02-15</hc-info-table-td>
  52. <hc-info-table-td center is-title>变更类型:</hc-info-table-td>
  53. <hc-info-table-td width="120px">一般变更</hc-info-table-td>
  54. <hc-info-table-td center is-title>延长工期:</hc-info-table-td>
  55. <hc-info-table-td width="120px">-</hc-info-table-td>
  56. </tr>
  57. <tr>
  58. <hc-info-table-td center is-title>变更申请金额:</hc-info-table-td>
  59. <hc-info-table-td width="120px">116</hc-info-table-td>
  60. <hc-info-table-td center is-title>设计图完成时间:</hc-info-table-td>
  61. <hc-info-table-td width="120px">2022-02-15</hc-info-table-td>
  62. <hc-info-table-td center is-title>实际变更桩号:</hc-info-table-td>
  63. <hc-info-table-td width="120px">-</hc-info-table-td>
  64. </tr>
  65. <tr>
  66. <hc-info-table-td center is-title>变更归类:</hc-info-table-td>
  67. <hc-info-table-td width="120px">-</hc-info-table-td>
  68. <hc-info-table-td center is-title>变更批复文号:</hc-info-table-td>
  69. <hc-info-table-td width="120px">-</hc-info-table-td>
  70. <hc-info-table-td center is-title>变更批复时间:</hc-info-table-td>
  71. <hc-info-table-td width="120px">-</hc-info-table-td>
  72. </tr>
  73. <tr>
  74. <hc-info-table-td center is-title>引用预变更:</hc-info-table-td>
  75. <hc-info-table-td width="auto" colspan="5">-</hc-info-table-td>
  76. </tr>
  77. <tr>
  78. <hc-info-table-td center is-title>变更原因:</hc-info-table-td>
  79. <hc-info-table-td width="auto" colspan="5">-</hc-info-table-td>
  80. </tr>
  81. </hc-info-table>
  82. </hc-card-item>
  83. <hc-card-item class="mt-3" title="变更申请部位">
  84. <hc-table :column="tableColumn1" :datas="tableData1" is-new :index-style="{ width: 60 }" />
  85. </hc-card-item>
  86. <hc-card-item class="mt-3" title="变更申请清单">
  87. <div class="hc-table-ref-box no-border">
  88. <el-table class="w-full" :data="tableData" row-key="id" height="100%" highlight-current-row border>
  89. <el-table-column type="index" label="序号" />
  90. <el-table-column prop="key1" label="清单编号" />
  91. <el-table-column prop="key2" label="清单名称" />
  92. <el-table-column prop="key3" label="单价" />
  93. <el-table-column label="数量" align="center">
  94. <el-table-column prop="key5" label="变更前" />
  95. <el-table-column prop="key6" label="变更增减" />
  96. <el-table-column prop="key7" label="变更后" />
  97. </el-table-column>
  98. <el-table-column label="金额" align="center">
  99. <el-table-column prop="key8" label="变更前" />
  100. <el-table-column prop="key9" label="变更增减" />
  101. <el-table-column prop="key10" label="变更后" />
  102. </el-table-column>
  103. </el-table>
  104. </div>
  105. </hc-card-item>
  106. <hc-card-item class="mt-3" title="附件列表">
  107. <hc-table :column="tableColumn2" :datas="tableData2" is-new :index-style="{ width: 60 }" />
  108. </hc-card-item>
  109. </el-scrollbar>
  110. </div>
  111. </div>
  112. <!-- 上报弹窗 -->
  113. <hc-report-dialog v-model="isReport" />
  114. <!-- 新增修改的弹窗 -->
  115. <addModal v-model="isAddShow" />
  116. </hc-new-card>
  117. </template>
  118. <script setup>
  119. import { nextTick, onMounted, ref } from 'vue'
  120. import addModal from './components/order/addModal.vue'
  121. import { getRandom } from 'js-fast-way'
  122. defineOptions({
  123. name: 'AlterAdminOrder',
  124. })
  125. const uuid = getRandom(4)
  126. //渲染完成
  127. onMounted(() => {
  128. setSplitRef()
  129. })
  130. //初始化设置拖动分割线
  131. const setSplitRef = () => {
  132. //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
  133. nextTick(() => {
  134. window.$split(['#hc_table_card_' + uuid, '#hc_info_card_' + uuid], {
  135. sizes: [60, 40],
  136. snapOffset: 0,
  137. minSize: [100, 400],
  138. })
  139. })
  140. }
  141. //类型tab数据和相关处理
  142. const tabKey = ref('key1')
  143. const tabTab = ref([
  144. { key: 'key1', name: '普通变更' },
  145. { key: 'key2', name: '工区变更' },
  146. ])
  147. const tabChange = (item) => {
  148. tabKey.value = item?.key
  149. console.log(item)
  150. }
  151. //搜索表单
  152. const searchForm = ref({
  153. key1: null, current: 1, size: 10, total: 0,
  154. })
  155. //分页
  156. const pageChange = ({ current, size }) => {
  157. searchForm.value.current = current
  158. searchForm.value.size = size
  159. }
  160. //表格数据
  161. const tableLoading = ref(false)
  162. const tableColumn = ref([
  163. { key: 'key1', name: '变更编号' },
  164. { key: 'key2', name: '变更名称' },
  165. { key: 'key3', name: '变更金额' },
  166. { key: 'key4', name: '变更类型' },
  167. { key: 'key5', name: '变更批复日期' },
  168. { key: 'key6', name: '审批状态' },
  169. { key: 'action', name: '操作', width: 94 },
  170. ])
  171. const tableData = ref([
  172. { key1: '1111' },
  173. ])
  174. const rowEditClick = () => {
  175. }
  176. //新增修改的弹窗
  177. const isAddShow = ref(false)
  178. const addModalClick = () => {
  179. isAddShow.value = true
  180. }
  181. //申请部位
  182. const tableColumn1 = ref([
  183. { key: 'key1', name: '工程名称' },
  184. { key: 'key2', name: '节点路径' },
  185. { key: 'key3', name: '合同图号' },
  186. { key: 'key4', name: '变更金额(元)' },
  187. { key: 'key5', name: '是否增补' },
  188. ])
  189. const tableData1 = ref([
  190. { key1: '1111' },
  191. ])
  192. //附件列表
  193. const tableColumn2 = ref([
  194. { key: 'key1', name: '文件名称' },
  195. { key: 'key2', name: '必须上传' },
  196. { key: 'key3', name: '附件列表' },
  197. ])
  198. const tableData2 = ref([
  199. { key1: '工程设计变更申请单', key2: '是', key3: '文件名称' },
  200. ])
  201. //是否上报
  202. const isReport = ref(false)
  203. const reportClick = () => {
  204. isReport.value = true
  205. }
  206. </script>