mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-03 08:20:36 +00:00
Merge remote-tracking branch 'origin/v5.1.0dev' into v5.1.0dev
This commit is contained in:
commit
784450e629
@ -344,12 +344,13 @@ export function productGetTemplateApi() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 商品 -- 获取运费模板
|
||||
* @description 获取上传参数
|
||||
*/
|
||||
export function productGetTempKeysApi() {
|
||||
export function productGetTempKeysApi(data) {
|
||||
return request({
|
||||
url: `product/product/get_temp_keys`,
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
@ -393,7 +394,7 @@ export function productUserLabel() {
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @description 商品添加编辑-- 用户标签
|
||||
* @description 上传类型
|
||||
*/
|
||||
export function uploadType() {
|
||||
return request({
|
||||
|
||||
@ -22,3 +22,15 @@ export function upload(data, config) {
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @description 云存储 url 上传
|
||||
* @param {Object} param data {Object} 传值参数
|
||||
*/
|
||||
export function ossUpload(url, data) {
|
||||
return request({
|
||||
url,
|
||||
method: 'post',
|
||||
file: true,
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
@ -136,7 +136,11 @@ export default {
|
||||
if (evfile.target.files[0].type !== 'video/mp4') {
|
||||
return that.$Message.error('只能上传mp4文件');
|
||||
}
|
||||
productGetTempKeysApi().then((res) => {
|
||||
let types = {
|
||||
key: evfile.target.files[0].name,
|
||||
contentType: evfile.target.files[0].type,
|
||||
};
|
||||
productGetTempKeysApi(types).then((res) => {
|
||||
that.$videoCloud
|
||||
.videoUpload({
|
||||
type: res.data.type,
|
||||
|
||||
@ -135,7 +135,11 @@ export default {
|
||||
if (evfile.target.files[0].type !== 'video/mp4') {
|
||||
return that.$Message.error('只能上传mp4文件');
|
||||
}
|
||||
productGetTempKeysApi().then((res) => {
|
||||
let types = {
|
||||
key: evfile.target.files[0].name,
|
||||
contentType: evfile.target.files[0].type,
|
||||
};
|
||||
productGetTempKeysApi(types).then((res) => {
|
||||
that.$videoCloud
|
||||
.videoUpload({
|
||||
type: res.data.type,
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
<Form ref="formValidate" :model="formValidate" :rules="ruleInline" inline>
|
||||
<FormItem label="选择类型:" class="form-item" label-position="right" :label-width="100">
|
||||
<RadioGroup v-model="formValidate.gender">
|
||||
<Radio :label="item.key" v-for="(item, index) in radioList" :key="index">{{ item.title }}</Radio>
|
||||
<Radio :label="1" v-if="virtualType !== 3">发货</Radio>
|
||||
<Radio :label="2" v-if="virtualType !== 3">送货</Radio>
|
||||
<Radio :label="3">虚拟</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
@ -113,6 +115,10 @@ export default {
|
||||
type: String | Number,
|
||||
default: '',
|
||||
},
|
||||
virtualType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'formValidate.shipStatus': {
|
||||
@ -134,6 +140,13 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
virtualType: {
|
||||
handler(nVal, oVal) {
|
||||
console.log(nVal);
|
||||
if (nVal == 3) this.formValidate.gender = 3;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -235,7 +235,7 @@
|
||||
</template>
|
||||
<!-- 发货弹窗 -->
|
||||
<Modal v-model="isDelivery" title="订单发送货" :footer-hide="true">
|
||||
<delivery v-if="isDelivery" @close="deliveryClose" @ok="deliveryOk" :orderId="orderId"></delivery>
|
||||
<delivery v-if="isDelivery" :virtualType="virtual_type" @close="deliveryClose" @ok="deliveryOk" :orderId="orderId"></delivery>
|
||||
</Modal>
|
||||
<!-- 订单备注 -->
|
||||
<Modal
|
||||
@ -353,6 +353,7 @@ export default {
|
||||
userGroupSelect: [],
|
||||
model1: '',
|
||||
curMenuIndex: 0,
|
||||
virtual_type: 0,
|
||||
menuList: [
|
||||
{
|
||||
key: '',
|
||||
@ -460,7 +461,9 @@ export default {
|
||||
},
|
||||
// 订单发货
|
||||
openDelivery(item) {
|
||||
console.log(item);
|
||||
this.orderId = item.id;
|
||||
this.virtual_type = item.virtual_type;
|
||||
this.isDelivery = true;
|
||||
},
|
||||
// 订单发货成功
|
||||
|
||||
@ -285,7 +285,11 @@ export default {
|
||||
if (suffix.indexOf('.mp4') === -1) {
|
||||
return that.$Message.error('只能上传MP4文件');
|
||||
}
|
||||
productGetTempKeysApi()
|
||||
let types = {
|
||||
key: evfile.target.files[0].name,
|
||||
contentType: evfile.target.files[0].type,
|
||||
};
|
||||
productGetTempKeysApi(types)
|
||||
.then((res) => {
|
||||
that.$videoCloud
|
||||
.videoUpload({
|
||||
|
||||
@ -653,11 +653,11 @@ export default {
|
||||
// 发送货
|
||||
sendOrder(row) {
|
||||
this.$refs.send.total_num = row.total_num;
|
||||
this.virtual_type = row.virtual_type;
|
||||
this.$refs.send.modals = true;
|
||||
this.orderId = row.id;
|
||||
this.status = row._status;
|
||||
this.pay_type = row.pay_type;
|
||||
this.virtual_type = row.virtual_type;
|
||||
this.$refs.send.getList();
|
||||
this.$refs.send.getDeliveryList();
|
||||
this.$nextTick((e) => {
|
||||
|
||||
@ -235,6 +235,21 @@
|
||||
<Col span="12" class="fontColor2">{{ orderDatalist.orderInfo.mark }}</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div v-if="orderDatalist.orderInfo.refund_type > 0">
|
||||
<Divider style="margin: 20px 0 !important" />
|
||||
<div class="ivu-description-list-title">售后信息</div>
|
||||
<Row class="mb10">
|
||||
<Col span="12">备注:{{ orderDatalist.orderInfo.refund_reason }}</Col>
|
||||
</Row>
|
||||
<Row class="mb10">
|
||||
<Col span="12">
|
||||
<div class="pic">
|
||||
<div v-for="(img, i) in orderDatalist.orderInfo.refund_img" :key="i" class="img">
|
||||
<img v-viewer :src="img" alt="" />
|
||||
</div></div
|
||||
></Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Card>
|
||||
</Drawer>
|
||||
<Modal v-model="modal2" scrollable title="物流查询" width="350" class="order_box2">
|
||||
|
||||
@ -157,10 +157,11 @@
|
||||
</template>
|
||||
</i-table>
|
||||
</FormItem>
|
||||
<FormItem label="寄件金额计算:">
|
||||
<Button @click="watchPrice">立即计算</Button>
|
||||
</FormItem>
|
||||
</div>
|
||||
<FormItem label="寄件金额计算:">
|
||||
<span class="red">{{ sendPrice }}</span>
|
||||
<a class="ml10" @click="watchPrice">立即计算</a>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button @click="cancel">取消</Button>
|
||||
@ -197,15 +198,6 @@ export default {
|
||||
pay_type: String,
|
||||
virtual_type: Number,
|
||||
},
|
||||
watch: {
|
||||
orderId(val) {
|
||||
if (this.virtual_type == 3) this.formItem.type = '3';
|
||||
},
|
||||
modals(newVal) {
|
||||
if (newVal) {
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderStatus: 0,
|
||||
@ -295,8 +287,14 @@ export default {
|
||||
],
|
||||
selectData: [],
|
||||
serviceTypeList: [],
|
||||
sendPrice: 0,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
virtual_type(val) {
|
||||
if (this.virtual_type == 3) this.formItem.type = '3';
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.kuaidiComsList(1);
|
||||
let delData;
|
||||
@ -322,9 +320,14 @@ export default {
|
||||
cart_num: v.num || v.surplus_num,
|
||||
});
|
||||
});
|
||||
orderPrice(data).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
orderPrice(data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.sendPrice = res.data.price;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$Message.error(err.msg);
|
||||
});
|
||||
},
|
||||
selectOne(data) {
|
||||
this.selectData = data;
|
||||
@ -343,6 +346,9 @@ export default {
|
||||
this.manyFormValidate.push(res.data[key]);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.formItem.cart_ids = [];
|
||||
this.selectData = [];
|
||||
}
|
||||
},
|
||||
changeRadio(o) {
|
||||
|
||||
@ -568,13 +568,13 @@ export default {
|
||||
getDataInfoNew(id)
|
||||
.then(async (res) => {
|
||||
this.orderDatalist = res.data;
|
||||
if (this.orderDatalist.orderInfo.refund_img.length) {
|
||||
try {
|
||||
this.orderDatalist.orderInfo.refund_img = JSON.parse(this.orderDatalist.orderInfo.refund_img);
|
||||
} catch (e) {
|
||||
this.orderDatalist.orderInfo.refund_img = [];
|
||||
}
|
||||
}
|
||||
// if (this.orderDatalist.orderInfo.refund_img.length) {
|
||||
// try {
|
||||
// this.orderDatalist.orderInfo.refund_img = this.orderDatalist.orderInfo.refund_img;
|
||||
// } catch (e) {
|
||||
// this.orderDatalist.orderInfo.refund_img = [];
|
||||
// }
|
||||
// }
|
||||
this.$nextTick((e) => {
|
||||
this.$refs.detailss.modals = true;
|
||||
});
|
||||
|
||||
@ -824,14 +824,14 @@
|
||||
placeholder="请输入一级返佣"
|
||||
:min="0"
|
||||
:max="9999999"
|
||||
class="columnsBox perW30"
|
||||
class="columnsBox perW20"
|
||||
v-model="manyBrokerage"
|
||||
></InputNumber>
|
||||
二级返佣:<InputNumber
|
||||
placeholder="请输入二级返佣"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="columnsBox perW30"
|
||||
class="columnsBox perW20"
|
||||
v-model="manyBrokerageTwo"
|
||||
></InputNumber>
|
||||
</span>
|
||||
@ -840,7 +840,7 @@
|
||||
placeholder="请输入会员价"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="columnsBox perW30"
|
||||
class="columnsBox perW20"
|
||||
v-model="manyVipPrice"
|
||||
></InputNumber>
|
||||
</span>
|
||||
@ -2317,7 +2317,12 @@ export default {
|
||||
if (suffix.indexOf('.mp4') === -1) {
|
||||
return that.$Message.error('只能上传MP4文件');
|
||||
}
|
||||
productGetTempKeysApi()
|
||||
console.log(evfile.target.files[0]);
|
||||
let types = {
|
||||
key: evfile.target.files[0].name,
|
||||
contentType: evfile.target.files[0].type,
|
||||
};
|
||||
productGetTempKeysApi(types)
|
||||
.then((res) => {
|
||||
that.$videoCloud
|
||||
.videoUpload({
|
||||
|
||||
@ -675,7 +675,11 @@ export default {
|
||||
if (suffix.indexOf('.mp4') === -1) {
|
||||
return that.$Message.error('只能上传MP4文件');
|
||||
}
|
||||
productGetTempKeysApi()
|
||||
let types = {
|
||||
key: evfile.target.files[0].name,
|
||||
contentType: evfile.target.files[0].type,
|
||||
};
|
||||
productGetTempKeysApi(types)
|
||||
.then((res) => {
|
||||
that.$videoCloud
|
||||
.videoUpload({
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
import * as qiniu from 'qiniu-js';
|
||||
import Cos from 'cos-js-sdk-v5';
|
||||
import axios from 'axios';
|
||||
import { upload } from '@/api/upload';
|
||||
import { upload, ossUpload } from '@/api/upload';
|
||||
|
||||
const sign = (method, publicKey, privateKey, md5, contentType, date, bucketName, fileName) => {
|
||||
const CryptoJS = require('crypto-js'); // 这里使用了crypto-js加密算法库,安装方法会在后面说明
|
||||
@ -38,7 +38,7 @@ export default {
|
||||
result = this.us3Http(config.evfile, config.res, config.uploading);
|
||||
break;
|
||||
case 'JDOSS':
|
||||
result = this.uploadMp4ToLocal(config.evfile, config.res, config.uploading);
|
||||
result = this.jdHttp(config.evfile, config.res, config.uploading);
|
||||
break;
|
||||
case 'CTOSS':
|
||||
result = this.obsHttp(config.evfile, config.res, config.uploading);
|
||||
@ -325,6 +325,22 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
// 京东云上传
|
||||
jdHttp(evfile, r, videoIng) {
|
||||
const fileObject = evfile.target.files[0]; // 获取的文件对象
|
||||
const formData = new FormData();
|
||||
formData.append('file', fileObject);
|
||||
return new Promise((resolve, reject) => {
|
||||
ossUpload(r.data.upload_url, formData)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
videoIng(true, 100);
|
||||
resolve(r.data);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 本地上传
|
||||
uploadMp4ToLocal(evfile, res, videoIng) {
|
||||
const fileObject = evfile.target.files[0]; // 获取的文件对象
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user