新增收款流水 店铺展示,修改菜单权限ui样式

master
lemon橪 2021-08-13 14:30:24 +08:00
parent 826454e164
commit 9e4449257e
2 changed files with 43 additions and 35 deletions

View File

@ -64,6 +64,12 @@ export default {
minWidth: 180,
tooltip: true,
},
{
title: "店铺名称",
key: "storeName",
minWidth: 100,
tooltip: true,
},
{
title: "支付方式",
key: "paymentMethod",

View File

@ -8,21 +8,6 @@
</RadioGroup>
</FormItem>
<div class="label-item">
<FormItem label="小图宽" prop="smallPictureWidth">
<Input type="number" v-model="formValidate.smallPictureWidth">
<span slot="prepend"></span>
<span slot="append">px</span>
</Input>
</FormItem>
<FormItem label="小图高" class="label-item" prop="smallPictureHeight">
<Input type="number" v-model="formValidate.smallPictureHeight">
<span slot="prepend"></span>
<span slot="append">px</span>
</Input>
</FormItem>
</div>
<div class="label-item">
<FormItem class="label-item" label="缩略图宽" prop="abbreviationPictureWidth">
<Input type="number" v-model="formValidate.abbreviationPictureWidth">
@ -38,6 +23,21 @@
</Input>
</FormItem>
</div>
<div class="label-item">
<FormItem label="小图宽" prop="smallPictureWidth">
<Input type="number" v-model="formValidate.smallPictureWidth">
<span slot="prepend"></span>
<span slot="append">px</span>
</Input>
</FormItem>
<FormItem label="小图高" class="label-item" prop="smallPictureHeight">
<Input type="number" v-model="formValidate.smallPictureHeight">
<span slot="prepend"></span>
<span slot="append">px</span>
</Input>
</FormItem>
</div>
<div class="label-item">
<FormItem class="label-item" label="原图宽高" prop="originalPictureWidth">
<Input type="number" v-model="formValidate.originalPictureWidth">
@ -64,13 +64,14 @@
</div>
</template>
<script>
import { setSetting,createIndex,getProgress } from "@/api/index";
import { setSetting, createIndex, getProgress } from "@/api/index";
import { handleSubmit } from "./validate";
export default {
props: ["res", "type"],
data() {
return {
formValidate: { //
formValidate: {
//
goodsCheck: 1,
smallPictureHeight: "0",
smallPictureWidth: "0",
@ -82,7 +83,7 @@ export default {
progressVal: 0,
showProgress: false,
intervalProgress: null,
ruleValidate: {} //
ruleValidate: {}, //
};
},
created() {
@ -92,48 +93,50 @@ export default {
//
submit(name) {
let that = this;
if( handleSubmit(that, name )){
this.setupSetting()
if (handleSubmit(that, name)) {
this.setupSetting();
}
},
//
createIndex(){
createIndex() {
createIndex().then((res) => {
if (res.success) {
this.$Message.success("开始生成!");
this.showProgress = true;
setTimeout(() => {
this.intervalProgress = setInterval(()=> {
getProgress().then(resp => {
let progressResult = resp.result
if (progressResult !=null && progressResult.flag === 0) {
this.intervalProgress = setInterval(() => {
getProgress().then((resp) => {
let progressResult = resp.result;
if (progressResult != null && progressResult.flag === 0) {
clearInterval(this.intervalProgress);
this.showProgress = false;
this.$Message.success("生成成功!");
} else {
this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
this.progressVal = Math.floor(
(progressResult.processed / progressResult.total) * 100
);
}
});
}, 1000);
}, 10000);
} else if (res.code === 100000) {
this.showProgress = true;
this.intervalProgress = setInterval(()=> {
getProgress().then(resp => {
let progressResult = resp.result
if (progressResult !=null && progressResult.flag === 0) {
this.intervalProgress = setInterval(() => {
getProgress().then((resp) => {
let progressResult = resp.result;
if (progressResult != null && progressResult.flag === 0) {
clearInterval(this.intervalProgress);
this.showProgress = false;
this.$Message.success("生成成功!");
} else {
this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
this.progressVal = Math.floor(
(progressResult.processed / progressResult.total) * 100
);
}
});
}, 1000);
}
});
},
//
setupSetting() {
@ -161,7 +164,7 @@ export default {
message: "请填写必填项",
trigger: "blur",
},
{
{
validator: (rule, value, callback) => {
if (value < 0) {
callback(new Error("不能输入负数!"));
@ -173,7 +176,6 @@ export default {
},
];
});
},
},
};