|
@@ -290,7 +290,7 @@
|
|
|
<el-input v-model="OrderForm.real_price" placeholder="请输入" :disabled="type == 'pone'"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="16" v-if="OrderForm.type == 'TO_C' && id">
|
|
|
+ <el-col :span="16" v-if="OrderForm.type == 'TO_C' && id">
|
|
|
<el-form-item label="交通费明细:" prop="real_price">
|
|
|
<el-button @click="reimList">报销</el-button>
|
|
|
</el-form-item>
|
|
@@ -299,10 +299,10 @@
|
|
|
<!-- <el-form-item label="交通费:" prop="real_price">
|
|
|
<el-button></el-button>
|
|
|
</el-form-item> -->
|
|
|
- </el-col>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8" v-if="OrderForm.type == 'TO_C' && id">
|
|
|
<el-form-item label="总金额:" prop="real_price" :rules="rules.pay_price">
|
|
|
- {{'¥'+totalAmount }}
|
|
|
+ {{ '¥' + totalAmount }}
|
|
|
<!-- <el-input v-model="OrderForm.real_price" placeholder="请输入" :disabled="type == 'pone'"></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -418,53 +418,53 @@
|
|
|
<el-button type="primary" @click="submitGoosData()">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="明细列表" :visible.sync="reimListVisible" >
|
|
|
- <el-table ref="table" :data="OrderForm.order_customer_fees" border style="width: 100%" >
|
|
|
- <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
+ <el-dialog title="明细列表" :visible.sync="reimListVisible">
|
|
|
+ <el-table ref="table" :data="OrderForm.order_customer_fees" border style="width: 100%">
|
|
|
+ <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
<el-table-column prop="money" label="金额"> </el-table-column>
|
|
|
<el-table-column prop="file_url" label="图片">
|
|
|
<template slot-scope="scope">
|
|
|
<img :src="scope.file_url" alt="">
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" @click="editReim(scope.row)">修改</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- <el-pagination @size-change="handlePageSizeChange" @current-change="handlePageCurrentChange"
|
|
|
+ <!-- <el-pagination @size-change="handlePageSizeChange" @current-change="handlePageCurrentChange"
|
|
|
:current-page="goodsData.page" :page-sizes="[10, 20, 50, 100]" :page-size="goodsData.size"
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="goodsData.total"></el-pagination> -->
|
|
|
- <!-- <span slot="footer" class="dialog-footer">
|
|
|
+ <!-- <span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="closeGoosData">取 消</el-button>
|
|
|
<el-button type="primary" @click="submitGoosData()">确 定</el-button>
|
|
|
</span> -->
|
|
|
</el-dialog>
|
|
|
<el-dialog title="交通费信息" :visible.sync="reimburVisible" :modal-append-to-body="false" :close-on-click-modal="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">
|
|
|
- <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>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -489,7 +489,7 @@ import {
|
|
|
} from "element-china-area-data";
|
|
|
import Print from "print-js";
|
|
|
import html2canvas from "html2canvas";
|
|
|
-
|
|
|
+import customAreaData from '@/customAreaData';
|
|
|
const initOrderForm = {
|
|
|
product_list: [],
|
|
|
payment_list: [],
|
|
@@ -510,7 +510,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
brcode: false,
|
|
|
- options: regionData,
|
|
|
+ options: customAreaData,
|
|
|
selectedOptions: [],
|
|
|
warehouseList: [], // 仓库列表
|
|
|
memberList: [], // 会员列表
|
|
@@ -756,12 +756,12 @@ export default {
|
|
|
orderType: '',//条形码查看类型
|
|
|
monthDiff: 0,
|
|
|
channList: [],//渠道列表
|
|
|
- totalAmount:0,//总计金额
|
|
|
- reimListVisible:false,
|
|
|
- reimburVisible:false,
|
|
|
+ totalAmount: 0,//总计金额
|
|
|
+ reimListVisible: false,
|
|
|
+ reimburVisible: false,
|
|
|
reimburForm: {
|
|
|
- order_id:'',
|
|
|
- money:"",
|
|
|
+ order_id: '',
|
|
|
+ money: "",
|
|
|
file_url: ''
|
|
|
},
|
|
|
};
|
|
@@ -783,15 +783,15 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//提交报销单
|
|
|
- addReimburForm(){
|
|
|
- API_Order.editOrderCustomerFee(this.reimburForm,this.reimburForm.id).then(res=>{
|
|
|
+ addReimburForm() {
|
|
|
+ API_Order.editOrderCustomerFee(this.reimburForm, this.reimburForm.id).then(res => {
|
|
|
this.$message.success('修改成功!')
|
|
|
- this.reimburVisible=false
|
|
|
+ this.reimburVisible = false
|
|
|
})
|
|
|
},
|
|
|
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) {
|
|
|
const isJPG = file.type === 'image/jpeg';
|
|
@@ -806,14 +806,14 @@ export default {
|
|
|
return isJPG && isLt2M;
|
|
|
},
|
|
|
/* 修改 */
|
|
|
- editReim(row){
|
|
|
- this.reimburForm=row
|
|
|
- this.reimburForm.file_url=''
|
|
|
- this.reimburVisible=true
|
|
|
+ editReim(row) {
|
|
|
+ this.reimburForm = row
|
|
|
+ this.reimburForm.file_url = ''
|
|
|
+ this.reimburVisible = true
|
|
|
},
|
|
|
/* 交通费明细 */
|
|
|
- reimList(){
|
|
|
- this.reimListVisible=true
|
|
|
+ reimList() {
|
|
|
+ this.reimListVisible = true
|
|
|
},
|
|
|
cleanUrl(url) {
|
|
|
// 检查URL是否以.png结尾
|
|
@@ -991,7 +991,11 @@ export default {
|
|
|
this.customer.dialogVisible = true;
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
- this.OrderForm.province_city_area = value.join(",");
|
|
|
+ /* const city = value[value.length - 2]; // 获取当前市的代码
|
|
|
+ const cityName = codeToText[city]; // 根据代码获取市的名称
|
|
|
+ const loc = value.map((code) => codeToText[code]).join(","); // 拼接地址字符串
|
|
|
+ this.OrderForm.province_city_area_address = loc.replace("市辖区", cityName); // 更新地址字段,替换市辖区为市名称*/
|
|
|
+ this.OrderForm.province_city_area = value.join(",");
|
|
|
//打印区域码所对应的属性值即中文地址
|
|
|
},
|
|
|
/** 初始化 */
|
|
@@ -1436,12 +1440,12 @@ export default {
|
|
|
el.good_vo = el.goods_vo
|
|
|
return el
|
|
|
});
|
|
|
- if(response.type == "TO_C"){
|
|
|
- response.order_customer_fees.map(el=>{
|
|
|
- this.totalAmount+= el.money + response.real_price
|
|
|
- })
|
|
|
+ if (response.type == "TO_C") {
|
|
|
+ response.order_customer_fees.map(el => {
|
|
|
+ this.totalAmount += el.money + response.real_price
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.selectedOptions = response.province_city_area.split(",");
|
|
|
this.OrderForm = response;
|
|
|
/* this.fileList = response.attachment
|
|
@@ -1453,7 +1457,7 @@ export default {
|
|
|
if (response.type == "TO_C") {
|
|
|
this.time.push(response.start_time);
|
|
|
this.time.push(response.end_time);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
/* if (this.OrderForm.payment_time) {
|
|
|
this.OrderForm.payment_time = Math.floor(
|
|
@@ -1595,8 +1599,8 @@ export default {
|
|
|
if (
|
|
|
newVal.name === "orderAdd" ||
|
|
|
newVal.name === "orderEdit" ||
|
|
|
- newVal.name === "orderDetail"||
|
|
|
- newVal.name === "extensionUpdate"
|
|
|
+ newVal.name === "orderDetail" ||
|
|
|
+ newVal.name === "extensionUpdate"
|
|
|
) {
|
|
|
this.init();
|
|
|
}
|
|
@@ -1695,6 +1699,7 @@ export default {
|
|
|
width: 200px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/deep/.avatar-uploader .el-upload {
|
|
|
border: 1px dashed #d9d9d9;
|
|
|
border-radius: 6px;
|