index.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <div class="app-container">
  3. <el-form inline :model="dataForm">
  4. <el-form-item>
  5. <el-select v-model="dataForm.actId" placeholder="请选择活动名" clearable filterable @change="getDataList()">
  6. <el-option
  7. v-for="item in actList"
  8. :key="item.actId"
  9. :label="item.name"
  10. :value="item.actId">
  11. </el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item>
  15. <el-button icon="el-icon-refresh-left" @click="getDataList">搜索</el-button>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-button icon="el-icon-refresh-left" @click="resetSearch">重置</el-button>
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button @click="save" style="float: right">保存</el-button>
  22. </el-form-item>
  23. </el-form>
  24. <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
  25. <el-table-column label="序号" type="index" width="55" align="center"/>
  26. <el-table-column
  27. prop="branName"
  28. header-align="center"
  29. align="center"
  30. label="承包单位"
  31. v-if="loginContractorId === 1">
  32. </el-table-column>
  33. <el-table-column
  34. prop="actId"
  35. header-align="center"
  36. align="center"
  37. width="400"
  38. label="活动名">
  39. <template slot-scope="scope">
  40. <span v-if="scope.row.actId === 110">入库审批流程</span>
  41. <span v-if="scope.row.actId === 120">出库审批流程</span>
  42. <span v-if="scope.row.actId === 130">货转审批流程</span>
  43. <span v-if="scope.row.actId === 140">调拨审批流程</span>
  44. <span v-if="scope.row.actId === 150">计算仓储费审批流程</span>
  45. <span v-if="scope.row.actId === 160">货物通关审批流程</span>
  46. <span v-if="scope.row.actId === 210">对账审批流程</span>
  47. <span v-if="scope.row.actId === 220">收费审批流程</span>
  48. <span v-if="scope.row.actId === 230">付费审批流程</span>
  49. <span v-if="scope.row.actId === 310">协议仓储费审批流程</span>
  50. <span v-if="scope.row.actId === 320">协议计划费审批流程</span>
  51. <span v-if="scope.row.actId === 410">下单审批流程</span>
  52. <span v-if="scope.row.actId === 420">配船审批流程</span>
  53. <span v-if="scope.row.actId === 430">凯和对账审批流程</span>
  54. <span v-if="scope.row.actId === 440">凯和收费审批流程</span>
  55. <span v-if="scope.row.actId === 450">凯和付费审批流程</span>
  56. <span v-if="scope.row.actId === 460">凯和费用审批流程</span>
  57. <span v-if="scope.row.actId === 470">凯和发票申请审批流程</span>
  58. <span v-if="scope.row.actId === 170">入库明细审批流程</span>
  59. <span v-if="scope.row.actId === 180">出库明细审批流程</span>
  60. <span v-if="scope.row.actId === 471">凯和商务端申请修改订单审批</span>
  61. <span v-if="scope.row.actId === 472">凯和商务端修改订单提交审批</span>
  62. <span v-if="scope.row.actId === 473">凯和商务端删除订单审批</span>
  63. <span v-if="scope.row.actId === 474">凯和拆单审批</span>
  64. <span v-if="scope.row.actId === 1000">费用变更审批</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column
  68. prop="reviewConditions"
  69. header-align="center"
  70. align="center"
  71. width="250"
  72. label="审核条件">
  73. <template slot-scope="scope">
  74. <span v-if="scope.row.reviewConditions === 'O'">
  75. 正常流程
  76. </span>
  77. <span v-if="scope.row.reviewConditions === 'I'">
  78. 非正常流程
  79. </span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column
  83. prop="pathId"
  84. header-align="center"
  85. align="center"
  86. label="审核路径">
  87. <template slot-scope="scope">
  88. <el-select v-model="scope.row.pathId" placeholder="审核路径" filterable style="width: 100%">
  89. <el-option
  90. v-for="item in optionsPathIds"
  91. :key="item.id"
  92. :label="item.pathName"
  93. :value="item.id">
  94. </el-option>
  95. </el-select>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. <pagination
  100. v-show="total>0"
  101. :total="total"
  102. :page.sync="dataForm.pageNum"
  103. :limit.sync="dataForm.pageSize"
  104. @pagination="getDataList"
  105. />
  106. </div>
  107. </template>
  108. <script>
  109. import {addCharge,preservation} from '@/api/system/auditConfiguration'
  110. export default {
  111. data () {
  112. return {
  113. dataForm: {
  114. branchId: this.$store.state.user.loginContractorId,
  115. actId: null,
  116. pageNum: 1,
  117. pageSize: 10,
  118. },
  119. total:0,
  120. dataList: [],
  121. optionsBranch: [],
  122. optionsPathIds: [],
  123. dataListLoading: false,
  124. loginContractorId: null,
  125. totalPage: 0,
  126. actList: [{
  127. name: '入库', actId: 110
  128. },{
  129. name: '出库', actId: 120
  130. },{
  131. name: '货转', actId: 130
  132. },{
  133. name: '调拨', actId: 140
  134. },{
  135. name: '计算仓储费', actId: 150
  136. },{
  137. name: '货物通关', actId: 160
  138. },
  139. {
  140. name: '对账', actId: 210
  141. },{
  142. name: '收费', actId: 220
  143. },{
  144. name: '付费', actId: 230
  145. },{
  146. name: '仓储费', actId: 310
  147. },{
  148. name: '计划费', actId: 320
  149. }
  150. ]
  151. }
  152. },
  153. activated () {
  154. // this.$http({
  155. // url: this.$http.adornUrl('/sys/user/getLoginContractorId'),
  156. // method: 'post'
  157. // }).then(({data}) => {
  158. // this.loginContractorId = data.loginContractorId
  159. // this.$set(this.dataForm, 'branchId', data.loginContractorId)
  160. // })
  161. // this.$http({
  162. // url: this.$http.adornUrl('/engineering/bbranchs/selectBranchs'),
  163. // method: 'post',
  164. // data: ({postAddr: 'audit'})
  165. // }).then(({data}) => {
  166. // if (typeof data.list !== 'undefined' && data.list !== null) {
  167. // if (typeof data.list.branchs !== 'undefined' && data.list.branchs !== null) {
  168. // this.optionsBranch = data.list.branchs
  169. // }
  170. // }
  171. // })
  172. this.$nextTick(function () {
  173. this.getDataList()
  174. })
  175. },
  176. methods: {
  177. // 获取数据列表
  178. getDataList () {
  179. console.log(this.dataForm)
  180. addCharge(this.dataForm).then(data =>{
  181. console.log(data)
  182. this.dataList = data.auditPathAct
  183. this.optionsPathIds = data.auditPath
  184. this.total = data.count
  185. })
  186. },
  187. // 保存
  188. save () {
  189. let formData = new window.FormData()
  190. formData.append('auditPathsActs', JSON.stringify(this.dataList))
  191. preservation(formData).then(data =>{
  192. console.log(data)
  193. this.$message.success('保存成功');
  194. })
  195. },
  196. // 每页数
  197. sizeChangeHandle (val) {
  198. this.dataForm.size = val
  199. this.dataForm.current = 1
  200. this.getDataList()
  201. },
  202. // 当前页
  203. currentChangeHandle (val) {
  204. this.dataForm.current = val
  205. this.getDataList()
  206. },
  207. resetSearch () {
  208. this.dataForm.actId = null
  209. this.dataForm.current = 1
  210. this.dataForm.size = 10
  211. this.getDataList()
  212. }
  213. }
  214. }
  215. </script>