|
@@ -1,329 +0,0 @@
|
|
-<template>
|
|
|
|
- <div id="detail">
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="24" class="main">
|
|
|
|
- <el-col :span="24" class="one">
|
|
|
|
- <el-col :span="24" class="top">
|
|
|
|
- <el-button type="primary" size="mini" @click="back">返回</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="down">
|
|
|
|
- <el-form :model="form" ref="form" label-width="100px">
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="订单号" prop="no">
|
|
|
|
- <el-input v-model="form.cashing_no" disabled></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="创新券类型" prop="coupons_type">
|
|
|
|
- <el-input v-model="form.coupons_type" disabled></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="使用单位" prop="company_name">
|
|
|
|
- <el-input v-model="form.company_name" placeholder="请输入使用单位" disabled></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="服务提供商" prop="mechanism_name">
|
|
|
|
- <el-input v-model="form.mechanism_name" placeholder="请输入服务提供商" disabled></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="订单总金额" prop="money">
|
|
|
|
- <el-input v-model="form.money"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="创新券抵扣额" prop="allowance">
|
|
|
|
- <el-input v-model="form.allowance" disabled></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12" class="text">
|
|
|
|
- <el-form-item label="应收金额" prop="total">
|
|
|
|
- <el-input v-model="form.total" disabled></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <!-- <el-col :span="24" class="file">
|
|
|
|
- <el-col :span="24" class="file_title"> 相关附件 </el-col>
|
|
|
|
- <el-col :span="24" class="file_info">
|
|
|
|
- <el-col :span="24" class="info_tit">1.创新券服务合同 </el-col>
|
|
|
|
- <el-col :span="24" class="info_upl">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.contract" :key="`contract-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="file_info">
|
|
|
|
- <el-col :span="24" class="info_tit">2.官方受理通知书 </el-col>
|
|
|
|
- <el-col :span="24" class="info_upl">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.accept" :key="`accept-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="file_info">
|
|
|
|
- <el-col :span="24" class="info_tit">3.官方缴费证明 </el-col>
|
|
|
|
- <el-col :span="24" class="info_upl">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.cost" :key="`cost-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="file_info">
|
|
|
|
- <el-col :span="24" class="info_tit">4.服务结果证明 </el-col>
|
|
|
|
- <el-col :span="24" class="info_upl">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.result" :key="`result-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="file_info">
|
|
|
|
- <el-col :span="24" class="info_tit">5.其他能够证明服务真实发生的材料 </el-col>
|
|
|
|
- <el-col :span="24" class="info_upl">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.result_else" :key="`result_else-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col> -->
|
|
|
|
- <el-col :span="24" class="file">
|
|
|
|
- <el-col :span="24" class="file_title"> 相关附件 </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="24" class="left">1.创新券服务合同</el-col>
|
|
|
|
- <el-col :span="24" class="right">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.contract" :key="`contract-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="24" class="left">2.官方缴费证明</el-col>
|
|
|
|
- <el-col :span="24" class="right">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.accept" :key="`accept-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="24" class="left">3.创新券服务合同</el-col>
|
|
|
|
- <el-col :span="24" class="right">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.cost" :key="`cost-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="24" class="left">4.服务结果证明</el-col>
|
|
|
|
- <el-col :span="24" class="right">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.result" :key="`result-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="24" class="left">5.其他能够证明服务真实发生的材料</el-col>
|
|
|
|
- <el-col :span="24" class="right">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in form.result_else" :key="`result_else-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="1" class="left"> 审核状态</el-col>
|
|
|
|
- <el-col :span="23" class="right">
|
|
|
|
- <el-radio-group v-model="form.status">
|
|
|
|
- <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value">{{ i.label }}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="text">
|
|
|
|
- <el-col :span="1" class="left"> 审核意见</el-col>
|
|
|
|
- <el-col :span="23" class="right">
|
|
|
|
- <el-input v-model="form.desc" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="formBtn">
|
|
|
|
- <el-button type="danger" size="mini" @click="back">取消保存</el-button>
|
|
|
|
- <el-button type="primary" size="mini" @click="onSubmit('form')">确认订单</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- </el-form>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </div>
|
|
|
|
-</template>
|
|
|
|
-
|
|
|
|
-<script>
|
|
|
|
-const moment = require('moment');
|
|
|
|
-const { cashingresult } = require('@common/dict/index');
|
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
-const { mapActions: cashing } = createNamespacedHelpers('cashing');
|
|
|
|
-const { mapActions: coupons } = createNamespacedHelpers('coupons');
|
|
|
|
-export default {
|
|
|
|
- name: 'detail',
|
|
|
|
- props: {},
|
|
|
|
- components: {},
|
|
|
|
- data: function () {
|
|
|
|
- return {
|
|
|
|
- form: {},
|
|
|
|
- imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
|
|
|
|
- statusList: cashingresult,
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- created() {
|
|
|
|
- if (this.id) this.search();
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- ...cashing(['fetch', 'update']),
|
|
|
|
- ...coupons({ couponsFetch: 'fetch' }),
|
|
|
|
- async search() {
|
|
|
|
- let res = await this.fetch(this.id);
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- this.$set(this, `form`, res.data);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 确认订单
|
|
|
|
- onSubmit(formName) {
|
|
|
|
- this.$refs[formName].validate(async (valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- let data = this.form;
|
|
|
|
- data.status = '1';
|
|
|
|
- data.end_time = this.nowDate();
|
|
|
|
- let arr = await this.couponsFetch(data.coupons_id);
|
|
|
|
- if (this.$checkRes(arr)) {
|
|
|
|
- let couponsData = arr.data;
|
|
|
|
- if (couponsData.discount_type == '全额折扣券') {
|
|
|
|
- data.money = Number(data.money);
|
|
|
|
- data.allowance = Number(data.money);
|
|
|
|
- data.total = 0;
|
|
|
|
- } else if (couponsData.discount_type == '折扣券') {
|
|
|
|
- data.money = Number(data.money);
|
|
|
|
- data.allowance = (Number(data.money) * Number(couponsData.scale)) / 100;
|
|
|
|
- data.total = Number(data.money) - data.allowance;
|
|
|
|
- } else if (couponsData.discount_type == '定额券') {
|
|
|
|
- data.money = Number(data.money);
|
|
|
|
- data.allowance = Number(couponsData.allowance);
|
|
|
|
- data.total = Number(data.money - couponsData.allowance);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- let newRecord = this.getRecord(data);
|
|
|
|
- data.record = data.record.concat(newRecord);
|
|
|
|
- let res = await this.update(data);
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '订单确认成功',
|
|
|
|
- type: 'success',
|
|
|
|
- });
|
|
|
|
- this.back();
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- console.log('error submit!!');
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- // 审核列表整合
|
|
|
|
- getRecord(data) {
|
|
|
|
- let arr = [{ status: data.status, desc: data.desc, desc_time: moment().format('YYYY-MM-DD HH:mm:ss') }];
|
|
|
|
- return arr;
|
|
|
|
- },
|
|
|
|
- // 最后审核时间
|
|
|
|
- nowDate() {
|
|
|
|
- return moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
- },
|
|
|
|
- back() {
|
|
|
|
- this.$router.push({ path: '/adminCenter/cashing/coupons' });
|
|
|
|
- },
|
|
|
|
- isImg(url) {
|
|
|
|
- const arr = url.split('.');
|
|
|
|
- const suffix = _.last(arr);
|
|
|
|
- return this.imgList.includes(suffix);
|
|
|
|
- },
|
|
|
|
- toOpen(url) {
|
|
|
|
- window.open(url);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- ...mapState(['user']),
|
|
|
|
- id() {
|
|
|
|
- return this.$route.query.id;
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- metaInfo() {
|
|
|
|
- return { title: this.$route.meta.title };
|
|
|
|
- },
|
|
|
|
- watch: {
|
|
|
|
- test: {
|
|
|
|
- deep: true,
|
|
|
|
- immediate: true,
|
|
|
|
- handler(val) {},
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-};
|
|
|
|
-</script>
|
|
|
|
-
|
|
|
|
-<style lang="less" scoped>
|
|
|
|
-.main {
|
|
|
|
- border-radius: 10px;
|
|
|
|
- box-shadow: 0 0 5px #cccccc;
|
|
|
|
- padding: 20px;
|
|
|
|
- .top {
|
|
|
|
- text-align: right;
|
|
|
|
- margin: 0 0 10px 0;
|
|
|
|
- }
|
|
|
|
- .down {
|
|
|
|
- .text {
|
|
|
|
- padding: 10px 0;
|
|
|
|
- border-bottom: 1px dashed #333;
|
|
|
|
- .left {
|
|
|
|
- text-align: left;
|
|
|
|
- color: #666;
|
|
|
|
- }
|
|
|
|
- .right {
|
|
|
|
- padding: 0 10px;
|
|
|
|
- img {
|
|
|
|
- width: 200px;
|
|
|
|
- height: 200px;
|
|
|
|
- border: 1px solid #ccc;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .desc {
|
|
|
|
- margin: 10px 0 0 0;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- /deep/.el-form-item {
|
|
|
|
- margin: 0;
|
|
|
|
- }
|
|
|
|
- .el-select {
|
|
|
|
- width: 100%;
|
|
|
|
- }
|
|
|
|
- .formBtn {
|
|
|
|
- text-align: center;
|
|
|
|
- padding: 10px 0;
|
|
|
|
- }
|
|
|
|
- .file {
|
|
|
|
- padding: 0 15px;
|
|
|
|
- .file_title {
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-weight: bold;
|
|
|
|
- margin: 10px 0 0 0;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-.main:hover {
|
|
|
|
- box-shadow: 0 0 5px #409eff;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|