123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <template>
- <div class="app-container">
- <el-form inline :model="dataForm">
- <el-form-item>
- <el-select v-model="dataForm.actId" placeholder="请选择活动名" filterable @change="getDataList()">
- <el-option
- v-for="item in actList"
- :key="item.actId"
- :label="item.name"
- :value="item.actId">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button icon="el-icon-refresh-left" @click="resetSearch">重置</el-button>
- </el-form-item>
- <el-form-item>
- <el-button @click="save" style="float: right">保存</el-button>
- </el-form-item>
- </el-form>
- <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
- <el-table-column
- prop="branName"
- header-align="center"
- align="center"
- label="承包单位"
- v-if="loginContractorId === 1">
- </el-table-column>
- <el-table-column
- prop="actId"
- header-align="center"
- align="center"
- width="400"
- label="活动名">
- <template slot-scope="scope">
- <span v-if="scope.row.actId === 110">入库</span>
- <span v-if="scope.row.actId === 120">出库</span>
- <span v-if="scope.row.actId === 130">货转</span>
- <span v-if="scope.row.actId === 140">调拨</span>
- <span v-if="scope.row.actId === 210">对账</span>
- <span v-if="scope.row.actId === 220">收费</span>
- <span v-if="scope.row.actId === 230">付费</span>
- <span v-if="scope.row.actId === 310">仓储费</span>
- <span v-if="scope.row.actId === 320">计划费</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="reviewConditions"
- header-align="center"
- align="center"
- width="250"
- label="审核条件">
- <template slot-scope="scope">
- <span v-if="scope.row.reviewConditions === 'O'">
- 正常流程
- </span>
- <span v-if="scope.row.reviewConditions === 'I'">
- 非正常流程
- </span>
- </template>
- </el-table-column>
- <el-table-column
- prop="pathId"
- header-align="center"
- align="center"
- label="审核路径">
- <template slot-scope="scope">
- <el-select v-model="scope.row.pathId" placeholder="审核路径" filterable style="width: 100%">
- <el-option
- v-for="item in optionsPathIds"
- :key="item.id"
- :label="item.pathName"
- :value="item.id">
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="sizeChangeHandle"
- @current-change="currentChangeHandle"
- :current-page="dataForm.current"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="dataForm.size"
- :total="totalPage"
- layout="total, sizes, prev, pager, next, jumper">
- </el-pagination>
- </div>
- </template>
- <script>
- import {addCharge,preservation} from '@/api/system/auditConfiguration'
- export default {
- data () {
- return {
- dataForm: {
- branchId: this.$store.state.user.loginContractorId,
- actId: null,
- current: 1,
- size: 10
- },
- dataList: [],
- optionsBranch: [],
- optionsPathIds: [],
- dataListLoading: false,
- loginContractorId: null,
- totalPage: 0,
- actList: [{
- name: '入库', actId: 110
- },{
- name: '出库', actId: 120
- },{
- name: '货转', actId: 130
- },{
- name: '调拨', actId: 140
- },{
- name: '对账', actId: 210
- },{
- name: '收费', actId: 220
- },{
- name: '付费', actId: 230
- },{
- name: '仓储费', actId: 310
- },{
- name: '计划费', actId: 320
- }
- ]
- }
- },
- activated () {
- // this.$http({
- // url: this.$http.adornUrl('/sys/user/getLoginContractorId'),
- // method: 'post'
- // }).then(({data}) => {
- // this.loginContractorId = data.loginContractorId
- // this.$set(this.dataForm, 'branchId', data.loginContractorId)
- // })
- // this.$http({
- // url: this.$http.adornUrl('/engineering/bbranchs/selectBranchs'),
- // method: 'post',
- // data: ({postAddr: 'audit'})
- // }).then(({data}) => {
- // if (typeof data.list !== 'undefined' && data.list !== null) {
- // if (typeof data.list.branchs !== 'undefined' && data.list.branchs !== null) {
- // this.optionsBranch = data.list.branchs
- // }
- // }
- // })
- this.$nextTick(function () {
- this.getDataList()
- })
- },
- methods: {
- // 获取数据列表
- getDataList () {
- addCharge().then(data =>{
- console.log(data)
- this.dataList = data.auditPathAct
- this.optionsPathIds = data.auditPath
- })
- },
- // 保存
- save () {
- console.log(JSON.stringify(this.dataList))
- preservation().then(data =>{
- console.log(data)
- })
- // this.$http({
- // url: this.$http.adornUrl('/engineering/auditPaths/saveAuditPathAct'),
- // method: 'post',
- // data: (JSON.stringify(this.dataList))
- // }).then(({data}) => {
- // if (data && data.code === 0) {
- // this.$message({
- // message: '操作成功',
- // type: 'success',
- // duration: 600,
- // onClose: () => {
- // this.getDataList()
- // }
- // })
- // } else {
- // this.$message.error(data.msg)
- // }
- // })
- },
- // 每页数
- sizeChangeHandle (val) {
- this.dataForm.size = val
- this.dataForm.current = 1
- this.getDataList()
- },
- // 当前页
- currentChangeHandle (val) {
- this.dataForm.current = val
- this.getDataList()
- },
- resetSearch () {
- this.dataForm.actId = null
- this.dataForm.current = 1
- this.dataForm.size = 10
- this.getDataList()
- }
- }
- }
- </script>
|