|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <!-- <div class="btn">
|
|
|
|
|
|
+ <!-- <div class="btn">
|
|
<el-button type="primary">同步订单</el-button>
|
|
<el-button type="primary">同步订单</el-button>
|
|
</div> -->
|
|
</div> -->
|
|
<div class="search">
|
|
<div class="search">
|
|
@@ -162,17 +162,17 @@
|
|
@click="handleSubmit(scope.row.id)">确认</el-button> -->
|
|
@click="handleSubmit(scope.row.id)">确认</el-button> -->
|
|
<el-button size="mini" @click="handleEdit(scope.row)"
|
|
<el-button size="mini" @click="handleEdit(scope.row)"
|
|
v-if="(scope.row.status === 'TO_BE_COMMIT' || scope.row.status === 'TO_BE_SEND') && checkPermission(['orderEdit'])">编辑</el-button>
|
|
v-if="(scope.row.status === 'TO_BE_COMMIT' || scope.row.status === 'TO_BE_SEND') && checkPermission(['orderEdit'])">编辑</el-button>
|
|
- <el-button size="mini" type="danger" v-if="scope.row.type === 'TO_C' && checkPermission(['extensionUpdate'])"
|
|
|
|
|
|
+ <el-button size="mini" v-if="scope.row.type === 'TO_C' && checkPermission(['extensionUpdate'])"
|
|
@click="handleWithdraw(scope.row.id)">延期</el-button>
|
|
@click="handleWithdraw(scope.row.id)">延期</el-button>
|
|
- <el-button size="mini" type="primary" v-if="!scope.row.has_pay_return"
|
|
|
|
- @click="payTypes(scope.row)">支付</el-button>
|
|
|
|
- <el-button size="mini" type="primary" v-if="!scope.row.has_pay_return && scope.row.type === 'TO_C'"
|
|
|
|
|
|
+ <el-button size="mini" v-if="!scope.row.has_pay_return" @click="payTypes(scope.row)">支付</el-button>
|
|
|
|
+ <el-button size="mini" v-if="!scope.row.has_pay_return && scope.row.type === 'TO_C'"
|
|
@click="reimbursement(scope.row)">交通费</el-button>
|
|
@click="reimbursement(scope.row)">交通费</el-button>
|
|
- <el-button size="mini" type="danger" style="margin-top: 5px;"
|
|
|
|
|
|
+ <el-button size="mini" style="margin-top: 5px;"
|
|
v-if="scope.row.status !== 'TO_BE_SEND' && checkPermission(['orderReturn2:add'])"
|
|
v-if="scope.row.status !== 'TO_BE_SEND' && checkPermission(['orderReturn2:add'])"
|
|
@click="afterSales(scope.row.id)">售后</el-button>
|
|
@click="afterSales(scope.row.id)">售后</el-button>
|
|
<el-button size="mini" @click="handleRevoke(scope.row)" style="margin-top: 5px;"
|
|
<el-button size="mini" @click="handleRevoke(scope.row)" style="margin-top: 5px;"
|
|
- v-if="(scope.row.status === 'TO_BE_COMMIT' || scope.row.status === 'TO_BE_SEND') && checkPermission(['order:withdraw'])">撤销</el-button>
|
|
|
|
|
|
+ v-if="(scope.row.status === 'TO_BE_COMMIT' || scope.row.status === 'TO_BE_SEND') && checkPermission(['order:withdraw'])"
|
|
|
|
+ type="danger">撤销</el-button>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -182,34 +182,40 @@
|
|
:page-size="pageData.page_size" layout="total, sizes, prev, pager, next, jumper" :total="pageData.data_total">
|
|
:page-size="pageData.page_size" layout="total, sizes, prev, pager, next, jumper" :total="pageData.data_total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</en-table-layout>
|
|
</en-table-layout>
|
|
- <el-dialog title="扫码支付" :visible.sync="payVisible" width="30%" :close-on-click-modal="false" @close="closeDialog">
|
|
|
|
- <div id="qrCode" style=" display: flex;
|
|
|
|
- justify-content: center;" ref="qrCodeDiv"></div>
|
|
|
|
|
|
+ <el-dialog title="扫码支付(支付宝)" :visible.sync="payVisible" width="30%" :close-on-click-modal="false"
|
|
|
|
+ @close="closeDialog">
|
|
|
|
+
|
|
|
|
+ <div id="qrCode" style="display: flex;justify-content: center;" ref="qrCodeDiv">
|
|
|
|
+ <!-- 二维码容器 -->
|
|
|
|
+ <div class="qr-code"></div>
|
|
|
|
+ <!-- Logo 图片 -->
|
|
|
|
+ <div ref="qrCodeDiv1"></div>
|
|
|
|
+ </div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog title="交通费信息" :visible.sync="reimburVisible" :modal-append-to-body="false" :close-on-click-modal="false"
|
|
<el-dialog title="交通费信息" :visible.sync="reimburVisible" :modal-append-to-body="false" :close-on-click-modal="false"
|
|
:close-on-press-escape="false">
|
|
:close-on-press-escape="false">
|
|
- <el-form :model="reimburForm" ref="reimburForm" label-width="120px" inline>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-form-item label="金额:" prop="money ">
|
|
|
|
- <el-input v-model="reimburForm.money" :minlength="2" :maxlength="20" clearable
|
|
|
|
- placeholder="请输入报销金额"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col>
|
|
|
|
- <el-form-item label="报销凭证:" prop="gender">
|
|
|
|
- <el-upload class="avatar-uploader" :action="MixinUploadApi"
|
|
|
|
- :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
|
|
|
- <img v-if="reimburForm.file_url" :src="reimburForm.file_url" class="avatar">
|
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
- </el-upload>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </el-form>
|
|
|
|
|
|
+ <el-form :model="reimburForm" ref="reimburForm" label-width="120px" inline>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="金额:" prop="money ">
|
|
|
|
+ <el-input v-model="reimburForm.money" :minlength="2" :maxlength="20" clearable
|
|
|
|
+ placeholder="请输入报销金额"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col>
|
|
|
|
+ <el-form-item label="报销凭证:" prop="gender">
|
|
|
|
+ <el-upload class="avatar-uploader" :action="MixinUploadApi" :show-file-list="false"
|
|
|
|
+ :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
|
|
|
+ <img v-if="reimburForm.file_url" :src="reimburForm.file_url" class="avatar">
|
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button @click="reimburVisible = false">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="addReimburForm">确 定</el-button>
|
|
|
|
|
|
+ <el-button @click="reimburVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="addReimburForm">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -265,11 +271,11 @@ export default {
|
|
pay_price: 0,
|
|
pay_price: 0,
|
|
reimburVisible: false,
|
|
reimburVisible: false,
|
|
reimburForm: {
|
|
reimburForm: {
|
|
- order_id:'',
|
|
|
|
- money:"",
|
|
|
|
|
|
+ order_id: '',
|
|
|
|
+ money: "",
|
|
file_url: ''
|
|
file_url: ''
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -298,19 +304,19 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//提交报销单
|
|
//提交报销单
|
|
- addReimburForm(){
|
|
|
|
- API_order.addOrderCustomerFee(this.reimburForm).then(res=>{
|
|
|
|
|
|
+ addReimburForm() {
|
|
|
|
+ API_order.addOrderCustomerFee(this.reimburForm).then(res => {
|
|
this.$message.success('添加成功')
|
|
this.$message.success('添加成功')
|
|
this.reimburVisible = false
|
|
this.reimburVisible = false
|
|
- this.reimburForm={}
|
|
|
|
|
|
+ this.reimburForm = {}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleAvatarSuccess(res, file) {
|
|
handleAvatarSuccess(res, file) {
|
|
- this.reimburForm.file_url =file.response.url
|
|
|
|
- // this.reimburForm.file_url = URL.createObjectURL(file.raw);
|
|
|
|
|
|
+ this.reimburForm.file_url = file.response.url
|
|
|
|
+ // this.reimburForm.file_url = URL.createObjectURL(file.raw);
|
|
},
|
|
},
|
|
beforeAvatarUpload(file) {
|
|
beforeAvatarUpload(file) {
|
|
-
|
|
|
|
|
|
+
|
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
|
|
|
|
|
/* if (!isJPG) {isJPG && const isJPG = file.type === 'image/jpeg';
|
|
/* if (!isJPG) {isJPG && const isJPG = file.type === 'image/jpeg';
|
|
@@ -319,11 +325,11 @@ export default {
|
|
if (!isLt2M) {
|
|
if (!isLt2M) {
|
|
this.$message.error('上传头像图片大小不能超过 10MB!');
|
|
this.$message.error('上传头像图片大小不能超过 10MB!');
|
|
}
|
|
}
|
|
- return isLt2M;
|
|
|
|
|
|
+ return isLt2M;
|
|
},
|
|
},
|
|
/* 报销 */
|
|
/* 报销 */
|
|
reimbursement(row) {
|
|
reimbursement(row) {
|
|
- this.reimburForm.order_id=row.id
|
|
|
|
|
|
+ this.reimburForm.order_id = row.id
|
|
this.reimburVisible = true
|
|
this.reimburVisible = true
|
|
},
|
|
},
|
|
//撤销
|
|
//撤销
|
|
@@ -367,8 +373,34 @@ export default {
|
|
colorLight: "#ffffff", //二维码背景色
|
|
colorLight: "#ffffff", //二维码背景色
|
|
correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
|
|
correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ /* this.positionLogo() */
|
|
}, 500);
|
|
}, 500);
|
|
},
|
|
},
|
|
|
|
+ positionLogo() {
|
|
|
|
+ let qrcode = new QRCode(this.$refs.qrCodeDiv, {
|
|
|
|
+ text: this.payurl + '#/payType?id=' + this.payCode + '&sn=' + this.paySn + '&price=' + this.pay_price,
|
|
|
|
+ width: 200,
|
|
|
|
+ height: 200,
|
|
|
|
+ colorDark: "#333333", //二维码颜色
|
|
|
|
+ colorLight: "#ffffff", //二维码背景色
|
|
|
|
+ correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
|
|
|
|
+ })
|
|
|
|
+ let logo = new Image();
|
|
|
|
+ logo.crossOrigin = 'Anonymous';
|
|
|
|
+ logo.src = "https://img2.baidu.com/it/u=3765512519,3278388264&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500"
|
|
|
|
+ let that = this;
|
|
|
|
+ let con = this.$refs.qrCodeDiv1;
|
|
|
|
+ logo.onload = function () {
|
|
|
|
+ let container = con;
|
|
|
|
+ let qrImg = qrcode._el.getElementsByTagName('img')[0];
|
|
|
|
+ let canvas = qrcode._el.getElementsByTagName('canvas')[0];
|
|
|
|
+ var ctx = canvas.getContext("2d");
|
|
|
|
+ ctx.drawImage(logo, 162 * 0.5 - 22, 162 * 0.5 - 22, 44, 44);
|
|
|
|
+ qrImg.src = canvas.toDataURL();
|
|
|
|
+ container.appendChild(qrcode._el);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
memberType(val) {
|
|
memberType(val) {
|
|
let name = "";
|
|
let name = "";
|
|
this.customerList.map((el) => {
|
|
this.customerList.map((el) => {
|