1
This commit is contained in:
parent
46b6d92a36
commit
e52f05a384
@ -2,3 +2,5 @@ build/*.js
|
||||
src/assets
|
||||
public
|
||||
dist
|
||||
views/
|
||||
views
|
||||
|
@ -22,7 +22,7 @@ module.exports = {
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/multiline-html-element-content-newline": "off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
@ -37,7 +37,8 @@ module.exports = {
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
// 'comma-dangle': [2, 'never'],
|
||||
'comma-dangle': "off",
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
@ -47,7 +48,7 @@ module.exports = {
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'eqeqeq': ["error", "always", { "null": "ignore" }],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
|
@ -53,6 +53,7 @@
|
||||
"file-saver": "2.0.1",
|
||||
"fuse.js": "3.4.4",
|
||||
"html2canvas": "^1.1.0",
|
||||
"jquery": "^3.7.1",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsonlint": "1.6.3",
|
||||
"jszip": "3.2.1",
|
||||
@ -69,8 +70,8 @@
|
||||
"screenfull": "4.2.0",
|
||||
"showdown": "1.9.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"view-design": "^4.3.2",
|
||||
"v-viewer": "^1.5.1",
|
||||
"view-design": "^4.3.2",
|
||||
"vue": "2.6.10",
|
||||
"vue-awesome-swiper": "^3.1.3",
|
||||
"vue-count-to": "1.0.13",
|
||||
|
@ -54,6 +54,7 @@ import * as filters from "./filters"; // global filters modalTemplates
|
||||
import notice from "@/libs/notice"; // global filters
|
||||
import guidancePop from "@/components/guidancePop";
|
||||
import { getToken } from "./utils/auth";
|
||||
|
||||
Vue.prototype.bus = new Vue();
|
||||
Vue.use(uploadPicture);
|
||||
Vue.use(FormCreate);
|
||||
@ -102,7 +103,7 @@ Object.keys(filters).forEach(key => {
|
||||
});
|
||||
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://cdn.oss.9gt.net/js/es.js?version=merchantv2.0";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
|
@ -1,16 +1,9 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<form-create
|
||||
v-if="FormData"
|
||||
ref="fc"
|
||||
v-loading="loading"
|
||||
:option="option"
|
||||
:rule="FormData.rule"
|
||||
class="formBox"
|
||||
handle-icon="false"
|
||||
@submit="onSubmit"
|
||||
/>
|
||||
<form-create v-model:api="fapi" v-if="FormData" ref="fc" v-loading="loading" :option="option"
|
||||
:rule="FormData.rule" class="formBox" handle-icon="false" @submit="onSubmit">
|
||||
</form-create>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@ -28,17 +21,23 @@
|
||||
import formCreate from '@form-create/element-ui'
|
||||
import { paymentTypeApi } from '@/api/accounts'
|
||||
import request from '@/api/request'
|
||||
import { roterPre } from '@/settings'
|
||||
import { roterPre } from '@/settings';
|
||||
|
||||
export default {
|
||||
name: 'payType',
|
||||
data() {
|
||||
return {
|
||||
fapi: {},
|
||||
option: {
|
||||
form: {
|
||||
labelWidth: '150px'
|
||||
},
|
||||
global: {
|
||||
'*': {
|
||||
props: {
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
upload: {
|
||||
props: {
|
||||
onSuccess(rep, file) {
|
||||
@ -48,7 +47,10 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
submitBtn: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
FormData: null,
|
||||
loading: false,
|
||||
@ -58,9 +60,9 @@ export default {
|
||||
components: {
|
||||
formCreate: formCreate.$form()
|
||||
},
|
||||
watch:{
|
||||
'$route.path': {
|
||||
handler: function() {
|
||||
watch: {
|
||||
'$route.path': {
|
||||
handler: function () {
|
||||
this.getFrom();
|
||||
},
|
||||
immediate: false,
|
||||
@ -70,13 +72,32 @@ export default {
|
||||
mounted() {
|
||||
this.getFrom();
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
console.log(this.$refs.fc)
|
||||
}, 2000);
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 为了隐藏提交按钮
|
||||
getDomInfo() {
|
||||
var labels = document.getElementsByTagName("label");
|
||||
for (let i = 0; i < labels.length; i++) {
|
||||
let label = labels[i];
|
||||
if (label.innerText == '审核通过' && label.className.indexOf("is-checked") > -1) {
|
||||
this.option.submitBtn.show = false;
|
||||
} else if (label.innerText != '审核通过' && label.className.indexOf("is-checked") > -1) {
|
||||
this.option.submitBtn.show = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setTagsViewTitle() {
|
||||
this.deepTraversal(this.menuList, "children");
|
||||
const route = Object.assign({}, this.tempRoute, { title: this.titles });
|
||||
this.$store.dispatch("tagsView/updateVisitedView", route);
|
||||
},
|
||||
|
||||
deepTraversal(arr, child) {
|
||||
const that = this;
|
||||
function traversal(a) {
|
||||
@ -96,11 +117,25 @@ export default {
|
||||
|
||||
traversal(arr);
|
||||
},
|
||||
|
||||
changes() {
|
||||
this.getDomInfo();
|
||||
},
|
||||
|
||||
getFrom() {
|
||||
this.loading = true
|
||||
paymentTypeApi().then(async res => {
|
||||
this.FormData = res.data
|
||||
this.loading = false
|
||||
this.FormData = res.data;
|
||||
this.FormData.rule[0] = {
|
||||
...this.FormData.rule[0],
|
||||
on: {
|
||||
change: this.changes
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.getDomInfo();
|
||||
})
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
this.loading = false
|
||||
@ -109,7 +144,7 @@ export default {
|
||||
onSubmit(formData) {
|
||||
request[this.FormData.method.toLowerCase()](this.FormData.api, formData).then((res) => {
|
||||
this.$message.success(res.message || '提交成功')
|
||||
// this.$router.push({ path: `${roterPre}/marketing/coupon/list` })
|
||||
// this.$router.push({ path: `${roterPre}/marketing/coupon/list` })
|
||||
}).catch(err => {
|
||||
this.$message.error(err.message || '提交失败')
|
||||
})
|
||||
@ -118,6 +153,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style lang="scss">
|
||||
.divBox {
|
||||
.el-select--medium {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -13,8 +13,8 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品类型:" required>
|
||||
<div v-for="(item, index) in virtual" :key="index" class="virtual" :class="formValidate.type == item.id
|
||||
? 'virtual_boder'
|
||||
: 'virtual_boder2'
|
||||
? 'virtual_boder'
|
||||
: 'virtual_boder2'
|
||||
" @click="virtualbtn(item.id, 2)">
|
||||
<div class="virtual_top">{{ item.tit }}</div>
|
||||
<div class="virtual_bottom">({{ item.tit2 }})</div>
|
||||
@ -275,8 +275,8 @@
|
||||
<el-input v-if="formThead[iii].title !== '付费会员价' &&
|
||||
formThead[iii].title !== '商品编号' &&
|
||||
formThead[iii].title !== '库存'
|
||||
" v-model="scope.row[iii]" type="number" min="0" size="small" class="priceBox"
|
||||
controls-position="right" @blur="memberPrice(formThead[iii], scope.row)" />
|
||||
" v-model="scope.row[iii]" type="number" min="0" size="small" class="priceBox" controls-position="right"
|
||||
@blur="memberPrice(formThead[iii], scope.row)" />
|
||||
<el-input v-if="formThead[iii].title === '库存' && formValidate.type == 2" v-model="scope.row[iii]"
|
||||
type="text" size="small" class="priceBox" disabled />
|
||||
<el-input v-else-if="formThead[iii].title === '库存' && formValidate.type != 2"
|
||||
@ -635,8 +635,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="(formValidate.delivery_way.length == 2 ||
|
||||
(formValidate.delivery_way.length == 1 &&
|
||||
formValidate.delivery_way[0] == 2)) &&
|
||||
(formValidate.delivery_way.length == 1 &&
|
||||
formValidate.delivery_way[0] == 2)) &&
|
||||
formValidate.type == 0
|
||||
" :span="24">
|
||||
<el-form-item label="是否包邮:">
|
||||
@ -2538,9 +2538,9 @@ export default {
|
||||
if (!this.formValidate.cate_id) {
|
||||
return this.$message.warning("基本信息-平台商品分类不能为空");
|
||||
}
|
||||
// if (!this.formValidate.mer_cate_id) {
|
||||
// return this.$message.warning("基本信息-商户商品分类不能为空");
|
||||
// }
|
||||
if (!this.formValidate.mer_cate_id) {
|
||||
return this.$message.warning("基本信息-商户商品分类不能为空");
|
||||
}
|
||||
if (!this.formValidate.image) {
|
||||
return this.$message.warning("基本信息-商品封面图不能为空");
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,8 @@ module.exports = {
|
||||
outputDir: 'dist',
|
||||
assetsDir: 'mer',
|
||||
indexPath: process.env.NODE_ENV === 'development' ? 'index.html' : 'mer.html',
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
lintOnSave: false,
|
||||
// lintOnSave: process.env.NODE_ENV === 'development',
|
||||
productionSourceMap: false,
|
||||
devServer: {
|
||||
port: port,
|
||||
@ -94,7 +95,7 @@ module.exports = {
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
|
Loading…
x
Reference in New Issue
Block a user