Commit 1831f2c8 by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !3
parents 907f6b30 57fd8c24
import constants from './constants'; import constants from './constants';
export const PAGE_TITLE = '管理系统'; export const PAGE_TITLE = '成都师范学院后勤管理系统';
export const RYM_GZKEY = 'dc2017'; export const RYM_GZKEY = 'dc2017';
export const IMG_URL = 'http://qiniu.dcrym.com/'; export const IMG_URL = 'http://qiniu.dcrym.com/';
export const CONSTANTS = constants; export const CONSTANTS = constants;
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<app-main></app-main> <app-main></app-main>
</div> </div>
</div> </div>
<!-- <div class="copyright"> <div class="copyright">
@copyright Copyright@成都多彩任意门科技有限公司2015-2017 蜀ICP备14012163号-1
</div> --> </div>
</div> </div>
</template> </template>
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
position: absolute; position: absolute;
top: calc(100vh - 30px); top: calc(100vh - 30px);
padding-left: 250px; padding-left: 250px;
font-size: 14px;
color: #666;
} }
} }
</style> </style>
......
...@@ -91,37 +91,31 @@ ...@@ -91,37 +91,31 @@
<span v-else>{{selected.carPlate}}</span> <span v-else>{{selected.carPlate}}</span>
</el-form-item> </el-form-item>
<el-form-item class="col-line-3" label="出车公里数" label-width="100px"> <el-form-item class="col-line-3" label="出车公里数" label-width="100px">
<el-input-number v-if="editType" v-model.trim="selected.startKilometers" :controls="false" :precision="0" :min="0" :max="9999999" placeholder="" clearable></el-input-number> <el-input-number v-model.trim="selected.startKilometers" :controls="false" :precision="0" :min="0" :max="9999999" placeholder="" clearable></el-input-number>
<span v-else>{{selected.startKilometers}}</span>
</el-form-item> </el-form-item>
<el-form-item class="col-line-3" label="收车公里数" label-width="100px"> <el-form-item class="col-line-3" label="收车公里数" label-width="100px">
<el-input-number v-if="editType" v-model.trim="selected.stopKilometers" :controls="false" :precision="0" :min="0" :max="9999999" placeholder="" clearable></el-input-number> <el-input-number v-model.trim="selected.stopKilometers" :controls="false" :precision="0" :min="0" :max="9999999" placeholder="" clearable></el-input-number>
<span v-else>{{selected.stopKilometers}}</span>
</el-form-item> </el-form-item>
<el-form-item class="col-line-3" label="实际公里数" label-width="100px"> <el-form-item class="col-line-3" label="实际公里数" label-width="100px">
<el-input-number v-if="editType" v-model.trim="selected.trueKilometers" :controls="false" :precision="0" :min="0" :max="9999999" placeholder="" clearable></el-input-number> <el-input-number v-model.trim="selected.trueKilometers" :controls="false" :precision="0" :min="0" :max="9999999" placeholder="" clearable></el-input-number>
<span v-else>{{selected.trueKilometers}}</span>
</el-form-item> </el-form-item>
<el-form-item label="资金来源" label-width="100px"> <el-form-item label="资金来源" label-width="100px">
<el-input v-if="editType" v-model.trim="selected.priceSource" placeholder="可不填" :maxlength="20" clearable></el-input> <el-input v-model.trim="selected.priceSource" placeholder="可不填" :maxlength="20" clearable></el-input>
<span v-else>{{selected.priceSource}}</span>
</el-form-item> </el-form-item>
<template v-if="editType"> <el-form-item label="用车单价" label-width="100px">
<el-form-item label="用车单价" label-width="100px"> <div class="item-value">
<div class="item-value"> <el-input-number v-model.trim="selected.price" :controls="false" :precision="2" :min="0" :max="9999999.99" placeholder="可不填" clearable></el-input-number>
<el-input-number v-model.trim="selected.price" :controls="false" :precision="2" :min="0" :max="9999999.99" placeholder="可不填" clearable></el-input-number> <el-input-number v-model.trim="selected.totalPrice" :controls="false" :precision="2" :min="0" :max="9999999.99" placeholder="可不填" clearable></el-input-number>
<el-input-number v-model.trim="selected.totalPrice" :controls="false" :precision="2" :min="0" :max="9999999.99" placeholder="可不填" clearable></el-input-number> </div>
</div> </el-form-item>
</el-form-item> <!-- <template v-else>
</template>
<template v-else>
<el-form-item class="col-line-2" label="用车单价" label-width="100px"> <el-form-item class="col-line-2" label="用车单价" label-width="100px">
<span>{{selected.price}}</span> <span>{{selected.price}}</span>
</el-form-item> </el-form-item>
<el-form-item class="col-line-2" label="用车金额" label-width="100px"> <el-form-item class="col-line-2" label="用车金额" label-width="100px">
<span>{{selected.totalPrice}}</span> <span>{{selected.totalPrice}}</span>
</el-form-item> </el-form-item>
</template> </template> -->
<el-form-item v-if="editType" label-width="100px"> <el-form-item v-if="editType" label-width="100px">
<div class="item-value-start"> <div class="item-value-start">
<el-radio v-model="selected.dealResult" @change="toogleDealResult" :label="2">同意</el-radio> <el-radio v-model="selected.dealResult" @change="toogleDealResult" :label="2">同意</el-radio>
...@@ -138,7 +132,8 @@ ...@@ -138,7 +132,8 @@
<el-button type="primary" @click="dealApplyHandle">确 定</el-button> <el-button type="primary" @click="dealApplyHandle">确 定</el-button>
</div> </div>
<div v-else slot="footer" class="dialog-footer"> <div v-else slot="footer" class="dialog-footer">
<el-button type="primary" @click="resetEditDialog">确 定</el-button> <el-button @click="resetEditDialog">取 消</el-button>
<el-button type="primary" @click="updateDealHandle">确 定</el-button>
</div> </div>
</drag-dialog> </drag-dialog>
<drag-dialog title="用车管理-打印" :visible.sync="dialogPrintVisible" :before-close="resetPrintDialog" width="70%" top="5vh"> <drag-dialog title="用车管理-打印" :visible.sync="dialogPrintVisible" :before-close="resetPrintDialog" width="70%" top="5vh">
...@@ -320,6 +315,28 @@ export default { ...@@ -320,6 +315,28 @@ export default {
console.log(action); console.log(action);
}); });
}, },
updateDealHandle() {
const entity = {
id: this.selected.id,
startKilometers: this.selected.startKilometers,
stopKilometers: this.selected.stopKilometers,
trueKilometers: this.selected.trueKilometers,
priceSource: this.selected.priceSource,
price: this.selected.price,
totalPrice: this.selected.totalPrice,
};
dealApply(entity)
.then(res => {
console.log(res);
this.fetchList();
this.$message.success(res.msg);
this.resetEditDialog();
})
.catch(err => {
console.log(err);
this.$message.error(err.msg || '处理失败!');
});
},
showPrintDialog(data) { showPrintDialog(data) {
let categoryName = JSON.parse(data.row.categoryName).map( let categoryName = JSON.parse(data.row.categoryName).map(
item => (item.checked ? `■ ${item.name}` : `□ ${item.name}`) item => (item.checked ? `■ ${item.name}` : `□ ${item.name}`)
......
...@@ -37,10 +37,12 @@ ...@@ -37,10 +37,12 @@
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column prop="name" label="报修人" min-width="120"></el-table-column> <el-table-column prop="name" label="报修人" min-width="120"></el-table-column>
<el-table-column prop="repairCellphone" label="报修人tel" min-width="120"></el-table-column> <el-table-column prop="repairCellphone" label="报修人tel" min-width="120"></el-table-column>
<el-table-column prop="applyIdentity" label="报修人身份" min-width="100"></el-table-column>
<el-table-column prop="area" label="报修区域" min-width="120"></el-table-column> <el-table-column prop="area" label="报修区域" min-width="120"></el-table-column>
<el-table-column prop="term" label="报修项目" min-width="120"></el-table-column> <el-table-column prop="term" label="报修项目" min-width="120"></el-table-column>
<el-table-column prop="address" label="报修地址" min-width="120"></el-table-column> <el-table-column prop="address" label="报修地址" min-width="120"></el-table-column>
<el-table-column prop="createDate" :formatter="(c,r,val) => $formatDate(new Date(val),'yyyy-MM-dd')" label="报修时间" min-width="120"></el-table-column> <el-table-column prop="createDate" :formatter="(c,r,val) => $formatDate(new Date(val),'yyyy-MM-dd')" label="报修时间" min-width="120"></el-table-column>
<el-table-column prop="applyCellphone" label="申报人电话" min-width="120"></el-table-column>
<el-table-column prop="dealState" :formatter="getDealStateValue" label="处理状态" min-width="120"></el-table-column> <el-table-column prop="dealState" :formatter="getDealStateValue" label="处理状态" min-width="120"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="80" align="center"> <el-table-column fixed="right" label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -75,7 +77,7 @@ ...@@ -75,7 +77,7 @@
<el-form-item v-if="selected.uploadImg" class="col-line-1" label="图片" label-width="100px"> <el-form-item v-if="selected.uploadImg" class="col-line-1" label="图片" label-width="100px">
<div class="previewRow"> <div class="previewRow">
<div class="previewItem" v-for="(item, index) in selected.uploadImg.split(',')" :key="index"> <div class="previewItem" v-for="(item, index) in selected.uploadImg.split(',')" :key="index">
<img :src="item" alt=""> <img :src="item" alt="" @click="showDetail(item)">
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -91,6 +93,12 @@ ...@@ -91,6 +93,12 @@
<el-button type="primary" @click="resetEditDialog">确 定</el-button> <el-button type="primary" @click="resetEditDialog">确 定</el-button>
</div> </div>
</drag-dialog> </drag-dialog>
<drag-dialog title="查看图片" :visible.sync="dialogImgVisible" :before-close="resetImgDialog" width="70%">
<img style="width: 100%;" :src="imgUrl" alt="">
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="resetImgDialog">确 定</el-button>
</div>
</drag-dialog>
</div> </div>
</template> </template>
...@@ -134,6 +142,8 @@ export default { ...@@ -134,6 +142,8 @@ export default {
value: '教师', value: '教师',
}, },
], ],
dialogImgVisible: false,
imgUrl: '',
}; };
}, },
created() { created() {
...@@ -202,6 +212,14 @@ export default { ...@@ -202,6 +212,14 @@ export default {
this.$message.error(err.msg || '处理失败!'); this.$message.error(err.msg || '处理失败!');
}); });
}, },
resetImgDialog() {
this.imgUrl = '';
this.dialogImgVisible = false;
},
showDetail(imgUrl) {
this.imgUrl = imgUrl;
this.dialogImgVisible = true;
},
}, },
}; };
</script> </script>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</el-pagination> </el-pagination>
</div> </div>
<!-- 新增/编辑账号 --> <!-- 新增/编辑账号 -->
<drag-dialog :title="editType ? '编辑账号' : '新增账号'" :visible.sync="dialogEditVisible" :before-close="resetEditDialog" width="70%"> <drag-dialog :title="editType ? '编辑用户' : '新增用户'" :visible.sync="dialogEditVisible" :before-close="resetEditDialog" width="70%">
<el-form class="editForm" :disabled="loading"> <el-form class="editForm" :disabled="loading">
<el-form-item class="editItem" label="姓名" label-width="100px"> <el-form-item class="editItem" label="姓名" label-width="100px">
<el-input v-model.trim="selected.name" placeholder="请输入姓名" :maxlength="20" clearable></el-input> <el-input v-model.trim="selected.name" placeholder="请输入姓名" :maxlength="20" clearable></el-input>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment