123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>作业配置项-列表</title>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
- <!-- 所有的 css & js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/httpVueLoader.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- </head>
- <body>
- <div class="vue-box" style="display: none;" :style="'display: block;'">
- <div class="c-panel">
- <!-- ------------- 检索参数 ------------- -->
- <div class="c-title">检索参数</div>
- <el-form ref="form" :model='p' @submit.native.prevent>
- <sa-item type="text" name="项目名称" v-model="p.name"></sa-item>
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <sa-item type="fast-btn" show="reset" style="display: inline;"></sa-item>
- <br/>
- </el-form>
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td name="项目名称" prop="name" width="300px"></sa-td>
- <!-- <sa-td name="业务类型" prop="businessType">
- <template slot-scope="s">
- <el-select :disabled="!sa.isAuth('tb-item-list-edit-type')" multiple v-model="s.row.type" placeholder="收费项" @change="businessChange(s.row)">
- <el-option v-for="item in businessTypeList" :key="item.value" :value="item.value"
- :label="item.name">
- </el-option>
- </el-select>
- </template>
- </sa-td> -->
- <sa-td name="税率" prop="taxRate"></sa-td>
- <!-- <sa-td name="项目编号" prop="code"></sa-td> -->
- <sa-td name="收费项" prop="code">
- <template slot-scope="s">
- <el-select v-if="s.row.items.length>0" v-model="s.row.items[0].id" placeholder="收费项">
- <el-option v-for="item in s.row.items" :key="item.id" :value="item.id"
- :label="item.itemName+' '+item.price+item.unit">
- </el-option>
- </el-select>
- </template>
- </sa-td>
- </el-table>
- <!-- ------------- 分页 ------------- -->
- <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
- </sa-item>
- </div>
- </div>
- <script>
- var app = new Vue({
- components: {
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
- "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
- },
- el: '.vue-box',
- data: {
- p: { // 查询参数
- id: '', // 主键
- name: '', // 项目名称
- business: 1,
- pageNo: 1, // 当前页
- pageSize: 20, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- itemTypeList: [],
- businessTypeList: [{
- value: '0',
- name: '默认'
- },
- {
- value: '1',
- name: '消杀'
- },
- {
- value: '2',
- name: '装卸'
- },
- {
- value: '3',
- name: '核酸'
- },
- ]
- },
- methods: {
- businessChange(data) {
- let obj = {
- id: data.id,
- businessType: data.type.join(',')
- }
- sa.ajax('/TbItemType/update', obj, function (res) {
- this.f5();
- }.bind(this));
- },
- // 刷新
- f5: function () {
- sa.ajax('/TbItemType/getList', sa.removeNull(this.p), function (res) {
- let list = res.data;
- // for(let i in list){
- // let obj=list[i];
- // obj.type=obj.businessType.split(',')
- // }
- this.dataList = list; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- },
- created: function () {
- this.f5();
- sa.onInputEnter();
- }
- })
- </script>
- </body>
- </html>
|