Commit ee79840a by damodmg

提交

parent 03781f29
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>微商城</title><link href=./static/css/app.14071e8b29e7cd338deceab954852d3f.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.4d61706f660a8aa65404.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>微商城</title><link href=./static/css/app.f3d17355ca9fb7aa510e69c92d01a205.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.5d95557c083ac2fe4513.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -90,6 +90,9 @@ export default {
} else if (!Number(this.giftProSkuIntegral)) {
this.$message.error('请输入数字类型');
this.giftProSkuIntegral = '';
} else if (Number(this.giftProSkuIntegral) > 10000000) {
this.$message.error('积分最大10000000');
this.giftProSkuIntegral = '';
} else {
this.giftProSkuIntegral = Number(this.giftProSkuIntegral).toFixed(0);
}
......@@ -98,9 +101,12 @@ export default {
if (Number(this.giftProSkuCash) < 0) {
this.$message.error('请输入大于0的数字');
this.giftProSkuCash = '';
} else if (!Number(this.giftProSkuIntegral)) {
} else if (!Number(this.giftProSkuCash)) {
this.$message.error('请输入数字类型');
this.giftProSkugiftProSkuCashIntegral = '';
this.giftProSkuCash = '';
} else if (Number(this.giftProSkuCash) > 9999999) {
this.$message.error('现金最大9999999');
this.giftProSkuCash = '';
} else {
this.giftProSkuCash = Number(this.giftProSkuCash).toFixed(2);
}
......@@ -115,6 +121,9 @@ export default {
} else if (!Number(item2.valueName)) {
this.$message.error('请输入数字类型');
item2.valueName = '';
} else if (Number(item2.valueName) > 1000000) {
this.$message.error('库存最大1000000');
item2.valueName = '';
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
......@@ -129,6 +138,9 @@ export default {
} else if (!Number(item2.valueName)) {
this.$message.error('请输入数字类型');
item2.valueName = '';
} else if (Number(item2.valueName) > 10000000) {
this.$message.error('积分最大10000000');
item2.valueName = '';
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
......@@ -143,6 +155,9 @@ export default {
} else if (!Number(item2.valueName)) {
this.$message.error('请输入数字类型');
item2.valueName = '';
} else if (Number(item2.valueName) > 9999999) {
this.$message.error('现金最大9999999');
item2.valueName = '';
} else {
item2.valueName = Number(item2.valueName).toFixed(2);
}
......
......@@ -6,7 +6,7 @@
<span class="sku-title">规格名</span>
<span style="display:none">{{ refash }}</span>
<el-dropdown trigger="click" placement="bottom-start" @command="i => getSelected(i, item)">
<el-input v-model="item.standardName" style="width:140px" size="smalll" placeholder="请选择" @focus="getStdList(item)" @keyup.enter.native="addStandard(item)"></el-input>
<el-input v-model="item.standardName" style="width:140px" size="smalll" placeholder="请选择" @input="value => spliceStandard(value, item)" @focus="getStdList(item)" @keyup.enter.native="addStandard(item)"></el-input>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item style="width:140px" :command="i" v-for="i in standardList" :key="i.standardId">{{ i.standardName }}</el-dropdown-item>
</el-dropdown-menu>
......@@ -21,7 +21,7 @@
<div class="value-list">
<div class="value-item" v-for="(v, n) in item.valueList" :key="n">
<el-dropdown trigger="click" placement="bottom-start" @command="i => getSelectedValue(i, item, n)">
<el-input v-model="v.valueName" style="width:140px" size="smalll" placeholder="请选择" @focus="getStdValueList(item)" @keyup.enter.native="addStandardValue(item, n)"></el-input>
<el-input v-model="v.valueName" style="width:140px" size="smalll" placeholder="请选择" @input="value => spliceStandardValue(value, item)" @focus="getStdValueList(item)" @keyup.enter.native="addStandardValue(item, n)"></el-input>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item style="width:140px" :command="m" v-for="m in standardValueList" :key="m.valueId">{{ m.valueName }}</el-dropdown-item>
</el-dropdown-menu>
......@@ -249,6 +249,17 @@ export default {
}
});
},
// 截取规格名
spliceStandardValue(value, item) {
this.$nextTick(() => {
item.valueName = getInputVal.getInputVal(value, 10);
});
},
spliceStandard(value, item) {
this.$nextTick(() => {
item.standardName = getInputVal.getInputVal(value, 10);
});
},
//去重规格值
getStdValueList(item) {
this.refash = !this.refash;
......@@ -377,24 +388,32 @@ export default {
} else if (!Number(this.intergral) < 0) {
this.$message.error('请输入大于等于0的数字');
this.intergral = '';
} else if (Number(this.intergral) > 10000000) {
this.$message.error('积分最大10000000');
this.intergral = '';
} else {
this.intergral = Number(this.intergral).toFixed(0);
}
},
// 现金
limitCash() {
if (Number(this.intergral) === 0) {
if (Number(this.cash) === 0) {
return false;
} else if (!Number(this.cash)) {
this.$message.error('请输入数字类型');
this.cash = '';
} else if (Number(this.cash) < 0) {
this.$message.error('请输入大于0的数字');
this.cash = '';
} else if (!Number(this.cash)) {
this.$message.error('请输入数字类型');
} else if (Number(this.cash) > 9999999) {
this.$message.error('现金最大9999999');
this.cash = '';
} else {
this.cash = Number(this.cash).toFixed(2);
}
},
// 库存
limitStock() {
if (Number(this.stock) < 0) {
......@@ -403,10 +422,14 @@ export default {
} else if (!Number(this.stock)) {
this.$message.error('请输入数字类型');
this.stock = '';
} else if (Number(this.stock) > 1000000) {
this.$message.error('现金最大1000000');
this.stock = '';
} else {
this.stock = Number(this.stock).toFixed(0);
}
},
// 编码
limitCode(value) {
this.$nextTick(() => {
......@@ -482,11 +505,14 @@ export default {
if (Number(item2.valueName < 0)) {
this.$message.error('请输入大于0的数字');
item2.valueName = '';
} else if (Number(this.giftForm.cashCost) === 0) {
} else if (Number(item2.valueName) === 0) {
return false;
} else if (!Number(item2.valueName)) {
this.$message.error('请输入数字类型');
item2.valueName = '';
} else if (Number(item2.valueName) > 10000000) {
this.$message.error('积分最大10000000');
item2.valueName = '';
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
......@@ -500,6 +526,9 @@ export default {
} else if (!Number(item2.valueName)) {
this.$message.error('请输入数字类型');
item2.valueName = '';
} else if (Number(item2.valueName) > 9999999) {
this.$message.error('现金最大9999999');
item2.valueName = '';
} else {
item2.valueName = Number(item2.valueName).toFixed(2);
}
......@@ -511,6 +540,9 @@ export default {
} else if (!Number(item2.valueName)) {
this.$message.error('请输入数字类型');
item2.valueName = '';
} else if (Number(item2.valueName) > 1000000) {
this.$message.error('库存最大1000000');
item2.valueName = '';
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
......
......@@ -44,7 +44,7 @@
</div>
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" v-loading="loading" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="40"> </el-table-column>
<el-table-column label="礼品信息" min-width="260px">
<el-table-column label="礼品信息" min-width="330px">
<template slot-scope="scope">
<div class="gift-info">
<img :src="scope.row.mainImageUrl" alt="" />
......@@ -82,9 +82,6 @@
</template>
</el-table-column>
<el-table-column prop="sort" label="排序" sortable="custom" min-width="140px">
<!-- <template slot-scope="scope">
<p>{{ scope.row.virtualStock }}<i class="el-icon-edit"></i></p>
</template> -->
<template slot-scope="scope">
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" @click="editNumber(scope.row)"></i></p>
<div v-if="scope.row.editStatus">
......
......@@ -279,7 +279,7 @@ export default {
exchangeDateWeekArr: [{ required: true, message: '请选择时间', trigger: 'change' }],
limitTimeBegin: [{ required: true, message: '请选择时间', trigger: 'change' }]
},
refundTypeStatus: false,
refundTypeStatus: true,
// uploadAction: window.location.origin + '/api-plug/upload-img?requestProject=integral-mall',
uploadAction: 'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall',
proNameLen: 0,
......@@ -564,6 +564,9 @@ export default {
} else if (!Number(this.giftForm.integralCost)) {
this.$message.error('请输入数字类型');
this.giftForm.integralCost = '';
} else if (Number(this.giftForm.integralCost) > 10000000) {
this.$message.error('积分最大10000000');
this.giftForm.integralCost = '';
} else {
this.giftForm.integralCost = Number(this.giftForm.integralCost).toFixed(0);
}
......@@ -578,6 +581,9 @@ export default {
} else if (!Number(this.giftForm.cashCost)) {
this.$message.error('请输入数字类型');
this.giftForm.cashCost = '';
} else if (Number(this.giftForm.cashCost) > 9999999) {
this.$message.error('现金最大9999999');
this.giftForm.cashCost = '';
} else {
this.giftForm.cashCost = Number(this.giftForm.cashCost).toFixed(2);
}
......@@ -590,6 +596,9 @@ export default {
} else if (!Number(this.giftForm.virtualStock)) {
this.$message.error('请输入数字类型');
this.giftForm.virtualStock = '';
} else if (Number(this.giftForm.virtualStock) > 1000000) {
this.$message.error('库存最大1000000');
this.giftForm.virtualStock = '';
} else {
this.giftForm.virtualStock = Number(this.giftForm.virtualStock).toFixed(0);
}
......
......@@ -31,7 +31,7 @@ export default {
},
data() {
let refundPointValidator = (rule, value, callback) => {
let reg = /^\d+$ /;
let reg = /^\d+$/;
if (Number(value) !== 0) {
if (!reg.test(Number(value))) {
callback(new Error('积分必须为正整数'));
......@@ -47,7 +47,7 @@ export default {
let refundMoneyValidator = (rule, value, callback) => {
let reg = /^\d+(\.\d+)?$/;
if (!reg.test(value)) {
callback(new Error('金额必须为数字类型'));
callback(new Error('金额必须为大于0数字类型'));
} else if (Number(value) > this.refundMoney) {
callback(new Error('不能超过最大可退金额'));
} else {
......
<template>
<el-dialog title="发货" :visible.sync="deliverdModal.dialogVisible" width="600px" @close="cancelSubmit('deliverdModal')">
<el-form :model="deliverdModal" ref="deliverdModal" :rules="modalRules">
<el-form-item v-if="deliverdModal.changeType === 2" label="收件人" label-width="80px">
<span>{{ deliverdModal.consignee }}</span>
</el-form-item>
<el-form-item v-if="deliverdModal.changeType === 2" label="联系方式" label-width="80px">
<span>{{ deliverdModal.consigneePhone }}</span>
</el-form-item>
<el-form-item v-if="deliverdModal.changeType === 2" label="收货地址" label-width="80px">
<span>{{ deliverdModal.receivingAddress }}</span>
</el-form-item>
<el-form-item label="快递公司" v-if="deliverdModal.changeType === 2" label-width="80px" prop="logisticsCompanyId">
<el-select v-model="deliverdModal.logisticsCompanyId" placeholder="请选择快递" clearable class="w-450" @change="changeLogistics">
<el-option :label="item.logisticsCompanyName" :value="item.logisticsCompanyId" v-for="(item, index) in logistiesList" :key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="deliverdModal.changeType === 2 && otherLogistics" label-width="80px" prop="otherLogisticsCompanyName">
<el-input type="text" v-model="deliverdModal.otherLogisticsCompanyName" class="w-450" placeholder="请输入快递公司" @input="value => logisticsNameLimit(value)"> </el-input>
</el-form-item>
<el-form-item v-if="deliverdModal.changeType === 2" label="运单编号" label-width="80px" prop="logisticsCode">
<el-input type="text" v-model="deliverdModal.logisticsCode" class="w-450" placeholder="请输入快递单号" @input="limitCode"> </el-input>
</el-form-item>
<el-form-item v-if="deliverdModal.changeType === 3" label="发货内容" label-width="80px" prop="content">
<el-input type="textarea" :rows="4" v-model="deliverdModal.content" class="w-450" @input="value => contentLimit(value)"> </el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit('deliverdModal')">取 消</el-button>
<el-button type="primary" @click="submitProNanme('deliverdModal')">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
// import qs from 'qs';
import request from '../../service/request.js';
import copy from '../../utils/clone.js';
import getInputVal from '../../utils/common.js';
export default {
props: {
deliverdModal: {
type: Object,
default() {
return {};
}
}
},
data() {
return {
reasonLen: 0,
refundPoint: '',
refundMoney: '',
otherLogistics: false,
otherLogisticsCompanyName: '', //其他公司快递名称
logisticsCompanyCode: '', //物流公司code
logisticsCompanyName: '',
modalRules: {
logisticsCompanyId: [{ required: true, message: '请选择快递公司', trigger: 'change' }],
logisticsCode: [{ required: true, message: '请输入运单编号', trigger: 'blur' }],
otherLogisticsCompanyName: [{ required: true, message: '请输入快递公司名称', trigger: 'blur' }],
content: [{ required: true, message: '请输入在线发货的内容', trigger: 'blur' }]
},
logistiesList: [] //快递公司
};
},
created() {
this.refundMoney = copy(this.deliverdModal.refundMoney);
this.refundPoint = copy(this.deliverdModal.refundPoint);
this.getLogistiesList();
},
methods: {
getLogistiesList() {
request.post('/api-integral-mall/load-logisties').then(res => {
if (res.data.errorCode === 0) {
if (res.data.result) {
this.logistiesList = res.data.result;
} else {
this.logistiesList = [];
}
} else {
this.$message.error(res.data.message);
}
});
},
changeLogistics(value) {
if (value) {
let code = this.logistiesList.find(item => {
return item.logisticsCompanyId === value;
}).logisticsCompanyCode;
this.logisticsCompanyCode = code;
if (code === 'QITA') {
this.otherLogistics = true;
} else {
this.otherLogistics = false;
this.deliverdModal.otherLogisticsCompanyName = '';
//获取下拉的快递名称
this.logisticsCompanyName = this.logistiesList.find(item => {
return item.logisticsCompanyId === this.deliverdModal.logisticsCompanyId;
}).logisticsCompanyName;
}
} else {
this.otherLogistics = false;
this.deliverdModal.otherLogisticsCompanyName = '';
}
},
logisticsNameLimit(value) {
this.$nextTick(() => {
this.deliverdModal.otherLogisticsCompanyName = getInputVal.getInputVal(value, 8);
});
},
limitCode(value) {
this.$nextTick(() => {
this.deliverdModal.logisticsCode = getInputVal.getInputVal(value, 32);
});
},
contentLimit(value) {
this.$nextTick(() => {
this.deliverdModal.content = getInputVal.getInputVal(value, 100);
});
},
//确认修改商品名称
submitProNanme(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
optType: 1, //1 发货; 2 取消订单; 3 修改物流;
integralMallProExchangeId: this.deliverdModal.integralMallProExchangeId,
logisticsCompanyId: this.deliverdModal.logisticsCompanyId, //物流公司id
logisticsCompanyCode: this.logisticsCompanyCode, //物流公司code号
logisticsCompanyName: this.otherLogistics ? this.deliverdModal.otherLogisticsCompanyName : this.logisticsCompanyName, //物流公司名称
courierNumber: this.deliverdModal.logisticsCode, //物流单号
cancelReason: '', //取消发货原因
deliveryContent: this.deliverdModal.changeType === 3 ? this.deliverdModal.content : '' //在线发货内容
};
if (this.deliverdModal.changeType === 3) {
params.logisticsCompanyId = '';
params.logisticsCompanyCode = '';
params.logisticsCompanyName = '';
params.courierNumber = '';
}
request.get('/api-integral-mall/order-opt', params).then(res => {
if (res.data.errorCode === 0) {
this.$message.success('发货成功');
this.deliverdModal.dialogVisible = false;
this.$emit('getList');
} else {
this.$message.error(res.data.message);
}
});
} else {
return false;
}
});
},
//取消修改
cancelSubmit(formName) {
this.$refs[formName].resetFields();
this.otherLogistics = false;
this.deliverdModal.dialogVisible = false;
}
}
};
</script>
<style scoped>
.w-450 {
width: 450px;
}
</style>
......@@ -129,17 +129,7 @@ export default {
pageSizes: [20, 30, 50],
pageSize: 20,
total: 0,
tableData: [
{
giftMainPic: 'https://pic01-10001430.image.myqcloud.com/3e2968e6-e033-4003-9f32-8486d109b014',
giftName: '天天',
createTime: 1546484379000,
definedCode: '2019010300000003',
memberName: 'test',
cardNum: 'dm20****1517',
proDisplayType: 1
}
],
tableData: [],
deliverNum: 0,
dateValue: [new Date() - 90 * 24 * 60 * 60 * 1000, new Date().valueOf()],
searchValue: '',
......
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