commit
d2d47a9131
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.mapper.RecycleDeviceConfigOneMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,11 @@
|
||||
package jnpf.model.datainterface;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DIDeviceListInfoModel implements Serializable {
|
||||
private List<String> ids;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,526 @@
|
||||
<template>
|
||||
<div class="popupSelect-container">
|
||||
<div class="el-select" @click="openDialog">
|
||||
<el-input
|
||||
:placeholder="placeholder"
|
||||
v-model="innerValue"
|
||||
readonly
|
||||
:validate-event="false"
|
||||
@mouseenter.native="inputHovering = true"
|
||||
@mouseleave.native="inputHovering = false"
|
||||
>
|
||||
<template slot="suffix">
|
||||
<i
|
||||
v-show="!showClose"
|
||||
:class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up']"
|
||||
></i>
|
||||
<i
|
||||
v-if="showClose"
|
||||
class="el-select__caret el-input__icon el-icon-circle-close"
|
||||
@click="clear"
|
||||
></i>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<template v-if="popupType === 'dialog'">
|
||||
<el-dialog
|
||||
:title="popupTitle"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
v-if="visible"
|
||||
class="JNPF-dialog JNPF-dialog_center"
|
||||
lock-scroll
|
||||
append-to-body
|
||||
:width="popupWidth"
|
||||
>
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="listQuery.keyword"
|
||||
placeholder="请输入关键词查询"
|
||||
clearable
|
||||
@keyup.enter.native="search()"
|
||||
class="search-input"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="search()"
|
||||
>
|
||||
{{ $t("common.search") }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()"
|
||||
>{{ $t("common.reset") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<div class="JNPF-common-search-box-right">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('common.refresh')"
|
||||
placement="top"
|
||||
>
|
||||
<el-link
|
||||
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
|
||||
:underline="false"
|
||||
@click="initData()"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-row>
|
||||
<JNPF-table
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
:border="false"
|
||||
highlight-current-row
|
||||
@row-click="rowClick"
|
||||
:hasNO="false"
|
||||
>
|
||||
<el-table-column width="35">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row[propsValue]" v-model="checked"
|
||||
> </el-radio
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
label="序号"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
:prop="item.value"
|
||||
:label="item.label"
|
||||
v-for="(item, i) in columnOptions"
|
||||
:key="i"
|
||||
/>
|
||||
</JNPF-table>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.currentPage"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@pagination="initData"
|
||||
v-if="hasPage"
|
||||
/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false" size="small">{{
|
||||
$t("common.cancelButton")
|
||||
}}</el-button>
|
||||
<el-button type="primary" @click="select()" size="small"
|
||||
>{{ $t("common.confirmButton") }}
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<template v-if="popupType === 'drawer'">
|
||||
<el-drawer
|
||||
:title="popupTitle"
|
||||
:visible.sync="visible"
|
||||
:wrapperClosable="false"
|
||||
ref="drawer"
|
||||
:size="popupWidth"
|
||||
append-to-body
|
||||
class="JNPF-common-drawer"
|
||||
>
|
||||
<div class="JNPF-flex-main">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="listQuery.keyword"
|
||||
placeholder="请输入关键词查询"
|
||||
clearable
|
||||
@keyup.enter.native="search()"
|
||||
class="search-input"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="search()"
|
||||
>
|
||||
{{ $t("common.search") }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()"
|
||||
>{{ $t("common.reset") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<div class="JNPF-common-search-box-right">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('common.refresh')"
|
||||
placement="top"
|
||||
>
|
||||
<el-link
|
||||
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
|
||||
:underline="false"
|
||||
@click="initData()"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-row>
|
||||
<JNPF-table
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
:border="false"
|
||||
highlight-current-row
|
||||
@row-click="rowClick"
|
||||
:hasNO="false"
|
||||
>
|
||||
<el-table-column width="35">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row[propsValue]" v-model="checked"
|
||||
> </el-radio
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
label="序号"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
:prop="item.value"
|
||||
:label="item.label"
|
||||
v-for="(item, i) in columnOptions"
|
||||
:key="i"
|
||||
/>
|
||||
</JNPF-table>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.currentPage"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@pagination="initData"
|
||||
v-if="hasPage"
|
||||
/>
|
||||
<div class="drawer-footer">
|
||||
<el-button @click="visible = false" size="small"
|
||||
>{{ $t("common.cancelButton") }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="select()" size="small"
|
||||
>{{ $t("common.confirmButton") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDataInterfaceDataSelect,
|
||||
getDataInterfaceDataInfoByIds
|
||||
} from "@/api/systemData/dataInterface";
|
||||
import emitter from "element-ui/src/mixins/emitter";
|
||||
import { getDeviceListOption, getDeviceListInfo } from "@/api/device";
|
||||
let {
|
||||
methods: { dispatch }
|
||||
} = emitter;
|
||||
export default {
|
||||
name: "PopupSelectDeviceCode",
|
||||
props: {
|
||||
value: {
|
||||
default: ""
|
||||
},
|
||||
rowIndex: {
|
||||
default: null
|
||||
},
|
||||
formData: {
|
||||
type: Object
|
||||
},
|
||||
templateJson: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
interfaceId: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "请选择"
|
||||
},
|
||||
propsValue: {
|
||||
type: String,
|
||||
default: "id"
|
||||
},
|
||||
relationField: {
|
||||
type: String,
|
||||
default: "fullName"
|
||||
},
|
||||
popupType: {
|
||||
type: String,
|
||||
default: "dialog"
|
||||
},
|
||||
popupTitle: {
|
||||
type: String,
|
||||
default: "选择数据"
|
||||
},
|
||||
popupWidth: {
|
||||
type: String,
|
||||
default: "800px"
|
||||
},
|
||||
field: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
columnOptions: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
hasPage: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
pageSize: {
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: "value",
|
||||
event: "input"
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
innerValue: "",
|
||||
listQuery: {
|
||||
keyword: "",
|
||||
currentPage: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
total: 0,
|
||||
checked: "",
|
||||
checkedTxt: "",
|
||||
checkedRow: {},
|
||||
listLoading: false,
|
||||
visible: false,
|
||||
inputHovering: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.setDefault();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showClose() {
|
||||
let hasValue = this.multiple
|
||||
? Array.isArray(this.value) && this.value.length > 0
|
||||
: this.value !== undefined && this.value !== null && this.value !== "";
|
||||
let criteria =
|
||||
this.clearable && !this.disabled && this.inputHovering && hasValue;
|
||||
return criteria;
|
||||
},
|
||||
propsLabel() {
|
||||
return this.columnOptions[0].value;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listQuery.pageSize = this.hasPage ? this.pageSize : 100000;
|
||||
this.setDefault();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
if (!this.interfaceId) return;
|
||||
this.listLoading = true;
|
||||
// const paramList = this.getParamList();
|
||||
// const columnOptions = this.columnOptions.map(o => o.value);
|
||||
// let query = {
|
||||
// ...this.listQuery,
|
||||
// interfaceId: this.interfaceId,
|
||||
// propsValue: this.propsValue,
|
||||
// relationField: this.relationField,
|
||||
// columnOptions: columnOptions.join(","),
|
||||
// paramList
|
||||
// };
|
||||
// console.log(query);
|
||||
// getDataInterfaceDataSelect(this.interfaceId, query)
|
||||
// .then(res => {
|
||||
// this.list = res.data.list;
|
||||
// this.total = res.data.pagination.total;
|
||||
// this.listLoading = false;
|
||||
// console.log(this.list);
|
||||
// console.log((this.total = res.data.pagination.total));
|
||||
// })
|
||||
// .catch(() => {
|
||||
// this.listLoading = false;
|
||||
// });
|
||||
getDeviceListOption()
|
||||
.then(res => {
|
||||
this.list = res.data;
|
||||
this.total = res.data.length;
|
||||
this.listLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
getParamList() {
|
||||
let templateJson = this.templateJson;
|
||||
if (!this.formData) return templateJson;
|
||||
for (let i = 0; i < templateJson.length; i++) {
|
||||
if (templateJson[i].relationField) {
|
||||
if (templateJson[i].relationField.includes("-")) {
|
||||
let tableVModel = templateJson[i].relationField.split("-")[0];
|
||||
let childVModel = templateJson[i].relationField.split("-")[1];
|
||||
templateJson[i].defaultValue =
|
||||
(this.formData[tableVModel] &&
|
||||
this.formData[tableVModel][this.rowIndex] &&
|
||||
this.formData[tableVModel][this.rowIndex][childVModel]) ||
|
||||
"";
|
||||
} else {
|
||||
templateJson[i].defaultValue =
|
||||
this.formData[templateJson[i].relationField] || "";
|
||||
}
|
||||
}
|
||||
}
|
||||
return templateJson;
|
||||
},
|
||||
interfaceDataHandler(data) {
|
||||
if (!data.dataProcessing) return data.list;
|
||||
const dataHandler = this.jnpf.getScriptFunc.call(
|
||||
this,
|
||||
data.dataProcessing
|
||||
);
|
||||
if (!dataHandler) return data.list;
|
||||
return dataHandler(data.list);
|
||||
},
|
||||
search() {
|
||||
this.initData();
|
||||
this.listQuery.currentPage = 1;
|
||||
this.listQuery.pageSize = this.hasPage ? this.pageSize : 10000;
|
||||
},
|
||||
reset() {
|
||||
this.listQuery.keyword = "";
|
||||
this.listQuery.currentPage = 1;
|
||||
this.listQuery.pageSize = this.hasPage ? this.pageSize : 10000;
|
||||
this.initData();
|
||||
},
|
||||
openDialog() {
|
||||
if (this.disabled) return;
|
||||
this.checked = this.value;
|
||||
this.visible = true;
|
||||
this.reset();
|
||||
},
|
||||
clear(event) {
|
||||
this.checked = "";
|
||||
this.innerValue = "";
|
||||
this.checkedRow = {};
|
||||
this.$emit("input", this.checked);
|
||||
this.$emit("change", this.checked, this.checkedRow);
|
||||
dispatch.call(this, "ElFormItem", "el.form.change", this.checked);
|
||||
event.stopPropagation();
|
||||
},
|
||||
select() {
|
||||
if (!this.checked) return;
|
||||
this.innerValue = this.checkedTxt;
|
||||
console.log(this.checked);
|
||||
console.log(this.checkedRow);
|
||||
this.$emit("input", this.checked);
|
||||
// this.$emit("change", this.checked, this.checkedRow);
|
||||
// dispatch.call(this, "ElFormItem", "el.form.change", this.checked);
|
||||
this.visible = false;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.checked = row[this.propsValue];
|
||||
this.checkedTxt = row[this.relationField];
|
||||
this.checkedRow = row;
|
||||
},
|
||||
setDefault() {
|
||||
console.log("zzzzzzzzzzz");
|
||||
if (this.value) {
|
||||
console.log(this.value);
|
||||
if (!this.interfaceId) return;
|
||||
const paramList = this.getParamList();
|
||||
// let query = {
|
||||
// ids: [this.value],
|
||||
// interfaceId: this.interfaceId,
|
||||
// propsValue: this.propsValue,
|
||||
// relationField: this.relationField,
|
||||
// paramList
|
||||
// };
|
||||
let query = {
|
||||
ids: [this.value]
|
||||
};
|
||||
console.log(this.interfaceId);
|
||||
console.log(this.value);
|
||||
|
||||
getDeviceListInfo(query).then(res => {
|
||||
const data = res.data && res.data.length ? res.data[0] : {};
|
||||
this.innerValue = data[this.relationField];
|
||||
if (!this.field) return;
|
||||
let relationData = this.$store.state.generator.relationData;
|
||||
console.log(relationData)
|
||||
console.log(this.field)
|
||||
this.$set(relationData, this.field, data);
|
||||
this.$eventBus.$emit("popupAttrEventBus", relationData, this.field);
|
||||
this.$store.commit("generator/UPDATE_RELATION_DATA", relationData);
|
||||
});
|
||||
|
||||
// getDataInterfaceDataInfoByIds(this.interfaceId, query).then(res => {
|
||||
// console.log(res);
|
||||
// const data = res.data && res.data.length ? res.data[0] : {};
|
||||
// this.innerValue = data[this.relationField];
|
||||
// if (!this.field) return;
|
||||
// let relationData = this.$store.state.generator.relationData;
|
||||
// this.$set(relationData, this.field, data);
|
||||
// this.$eventBus.$emit("popupAttrEventBus", relationData, this.field);
|
||||
// this.$store.commit("generator/UPDATE_RELATION_DATA", relationData);
|
||||
// });
|
||||
} else {
|
||||
this.innerValue = "";
|
||||
if (!this.field) return;
|
||||
let relationData = this.$store.state.generator.relationData;
|
||||
this.$set(relationData, this.field, {});
|
||||
this.$eventBus.$emit("popupAttrEventBus", relationData, this.field);
|
||||
this.$store.commit("generator/UPDATE_RELATION_DATA", relationData);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
>>> .el-dialog__body {
|
||||
height: 70vh;
|
||||
padding: 0 0 10px !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
.JNPF-common-search-box {
|
||||
margin-bottom: 0;
|
||||
.JNPF-common-search-box-right {
|
||||
padding: 10px 10px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,310 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack"
|
||||
content="详情"/>
|
||||
<div class="options">
|
||||
<el-button @click="goBack">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
|
||||
<el-form ref="formRef" :model="dataForm" size="medium" label-width="150px" label-position="right" >
|
||||
<template v-if="!loading">
|
||||
<el-col :span="24">
|
||||
<el-collapse :accordion="false" v-model="activebufuev" class="mb-20">
|
||||
<el-collapse-item title="价格配置" name="1">
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="统一投递价格"
|
||||
prop="deliveryPrice" >
|
||||
<p>{{dataForm.deliveryPrice}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<JnpfAlert
|
||||
:show-icon= "true" type="success" :closable= "false" title ="温馨提示" description ="当前画面对本商户下的所有投递柜统一配置回收结算价格,若《回收桶配置》画面针对单个桶配置了回收价格,则优先按照《回收桶配置》中的价格结算!!!" >
|
||||
</JnpfAlert>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="1号桶价格"
|
||||
prop="bucket1Price" >
|
||||
<p>{{dataForm.bucket1Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="2号桶价格"
|
||||
prop="bucket2Price" >
|
||||
<p>{{dataForm.bucket2Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="3号桶价格"
|
||||
prop="bucket3Price" >
|
||||
<p>{{dataForm.bucket3Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="4号桶价格"
|
||||
prop="bucket4Price" >
|
||||
<p>{{dataForm.bucket4Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="5号桶价格"
|
||||
prop="bucket5Price" >
|
||||
<p>{{dataForm.bucket5Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="6号桶价格"
|
||||
prop="bucket6Price" >
|
||||
<p>{{dataForm.bucket6Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="7号桶价格"
|
||||
prop="bucket7Price" >
|
||||
<p>{{dataForm.bucket7Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="8号桶价格"
|
||||
prop="bucket8Price" >
|
||||
<p>{{dataForm.bucket8Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="9号桶价格"
|
||||
prop="bucket9Price" >
|
||||
<p>{{dataForm.bucket9Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="10号桶价格"
|
||||
prop="bucket10Price" >
|
||||
<p>{{dataForm.bucket10Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="11号桶价格"
|
||||
prop="bucket11Price" >
|
||||
<p>{{dataForm.bucket11Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="12号桶价格"
|
||||
prop="bucket12Price" >
|
||||
<p>{{dataForm.bucket12Price}}元</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设备配置" name="2">
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="投递审核配置 "
|
||||
prop="deliveryAdjustSet" tip-label="投递后审核结算" >
|
||||
<p>{{ dataForm.deliveryAdjustSet }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="手机号登录"
|
||||
prop="allowPhoneLogin" tip-label="投递柜手机号登录入库" >
|
||||
<p>{{dataForm.allowPhoneLogin}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="清运锁"
|
||||
prop="cleanLock" tip-label="清运时是否输入垃圾袋编号" >
|
||||
<p>{{dataForm.cleanLock}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="清运审核配置"
|
||||
prop="cleanAdjustSet" tip-label="清运数据审核入库" >
|
||||
<p>{{ dataForm.cleanAdjustSet }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="烟雾报警"
|
||||
prop="smogSet" tip-label="烟雾报警事件上报" >
|
||||
<p>{{dataForm.smogSet}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="投递关门"
|
||||
prop="closeDelay" >
|
||||
<p>{{dataForm.closeDelay}}秒</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="满溢报警"
|
||||
prop="fullSet" tip-label="满溢时发送通知" >
|
||||
<p>{{dataForm.fullSet}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="报警重量"
|
||||
prop="warningWeight" >
|
||||
<p>{{dataForm.warningWeight}}KG</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="宣传配置" name="BwNYw72">
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<JnpfAlert
|
||||
:show-icon= "true" type="success" :closable= "false" title ="温馨提示" description ="开启宣传配置后,投递柜将在空闲时播报宣传标语,播放宣传海报" >
|
||||
</JnpfAlert>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="宣传配置"
|
||||
prop="promotionSet" tip-label="开启空闲设备宣传" >
|
||||
<p>{{dataForm.promotionSet}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label="宣传标语"
|
||||
prop="promotionalSlogans" tip-label="宣传标语" >
|
||||
<p>{{dataForm.promotionalSlogans}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label="宣传海报"
|
||||
prop="promotionPic1" tip-label="设备空闲时展示海报" >
|
||||
<JnpfUploadImg v-model="dataForm.promotionPic1"
|
||||
disabled
|
||||
detailed :fileSize="2" sizeUnit="MB" :limit="5" pathType="defaultPath" :isAccount="0" >
|
||||
</JnpfUploadImg>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="修改用户"
|
||||
prop="lastModifyUserId" >
|
||||
<p>{{dataForm.lastModifyUserId}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="修改时间"
|
||||
prop="lastModifyTime" >
|
||||
<p>{{dataForm.lastModifyTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
|
||||
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: { Detail},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
detailVisible: false,
|
||||
loading: false,
|
||||
|
||||
dataForm: {
|
||||
id :'',
|
||||
deliveryPrice : '',
|
||||
bucket1Price : '',
|
||||
bucket2Price : '',
|
||||
bucket3Price : '',
|
||||
bucket4Price : '',
|
||||
bucket5Price : '',
|
||||
bucket6Price : '',
|
||||
bucket7Price : '',
|
||||
bucket8Price : '',
|
||||
bucket9Price : '',
|
||||
bucket10Price : '',
|
||||
bucket11Price : '',
|
||||
bucket12Price : '',
|
||||
deliveryAdjustSet : "",
|
||||
allowPhoneLogin : "",
|
||||
cleanLock : "",
|
||||
cleanAdjustSet : "",
|
||||
smogSet : "",
|
||||
closeDelay : '',
|
||||
fullSet : "",
|
||||
warningWeight : '',
|
||||
promotionSet : "",
|
||||
promotionalSlogans : '',
|
||||
promotionPic1 : [],
|
||||
lastModifyUserId : "",
|
||||
lastModifyTime : "",
|
||||
organizeJsonId : "",
|
||||
},
|
||||
activebufuev:["1","2","BwNYw72"],
|
||||
deliveryAdjustSetOptions:[{"fullName":"即时自动","id":"1"},{"fullName":"24H自动","id":"2"},{"fullName":"48H自动","id":"3"}],
|
||||
deliveryAdjustSetProps:{"label":"fullName","value":"id" },
|
||||
allowPhoneLoginProps:{"label":"fullName","value":"enCode" },
|
||||
cleanLockProps:{"label":"fullName","value":"enCode" },
|
||||
cleanAdjustSetOptions:[{"fullName":"自动","id":"1"},{"fullName":"手动","id":"2"}],
|
||||
cleanAdjustSetProps:{"label":"fullName","value":"id" },
|
||||
smogSetProps:{"label":"fullName","value":"enCode" },
|
||||
fullSetProps:{"label":"fullName","value":"enCode" },
|
||||
promotionSetProps:{"label":"fullName","value":"enCode" },
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
toDetail(defaultValue, modelId) {
|
||||
if (!defaultValue) return
|
||||
getConfigData(modelId).then(res => {
|
||||
if (!res.data || !res.data.formData) return
|
||||
let formData = JSON.parse(res.data.formData)
|
||||
formData.popupType = 'general'
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||
})
|
||||
})
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/scm/RecycleDeviceConfigOne/detail/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,871 @@
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack"
|
||||
:content="!dataForm.id ? '新建':'编辑'"/>
|
||||
<div class="options">
|
||||
<el-dropdown class="dropdown" placement="bottom">
|
||||
<el-button style="width:70px">
|
||||
更 多<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<template v-if="dataForm.id">
|
||||
<el-dropdown-item @click.native="prev" :disabled='prevDis'>
|
||||
{{'上一条'}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="next" :disabled='nextDis'>
|
||||
{{'下一条'}}
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
|
||||
:loading="continueBtnLoading" :disabled='btnLoading'>
|
||||
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" :disabled='continueBtnLoading'> 保 存</el-button>
|
||||
<el-button @click="goBack"> 取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
|
||||
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="medium" label-width="150px" label-position="right" >
|
||||
<template v-if="!loading">
|
||||
<!-- 具体表单 -->
|
||||
<el-col :span="24">
|
||||
<el-collapse :accordion="false" v-model="activebufuev" class="mb-20">
|
||||
<el-collapse-item title="价格配置" name="1">
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="统一投递价格" prop="deliveryPrice" >
|
||||
<JnpfInput v-model="dataForm.deliveryPrice" @change="changeData('deliveryPrice',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item>
|
||||
<JnpfAlert
|
||||
title='温馨提示' description="当前画面对本商户下的所有投递柜统一配置回收结算价格,若《回收桶配置》画面针对单个桶配置了回收价格,则优先按照《回收桶配置》中的价格结算!!!" showIcon type='success'>
|
||||
</JnpfAlert>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="1号桶价格" prop="bucket1Price" >
|
||||
<JnpfInput v-model="dataForm.bucket1Price" @change="changeData('bucket1Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="2号桶价格" prop="bucket2Price" >
|
||||
<JnpfInput v-model="dataForm.bucket2Price" @change="changeData('bucket2Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="3号桶价格" prop="bucket3Price" >
|
||||
<JnpfInput v-model="dataForm.bucket3Price" @change="changeData('bucket3Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="4号桶价格" prop="bucket4Price" >
|
||||
<JnpfInput v-model="dataForm.bucket4Price" @change="changeData('bucket4Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="5号桶价格" prop="bucket5Price" >
|
||||
<JnpfInput v-model="dataForm.bucket5Price" @change="changeData('bucket5Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="6号桶价格" prop="bucket6Price" >
|
||||
<JnpfInput v-model="dataForm.bucket6Price" @change="changeData('bucket6Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="7号桶价格" prop="bucket7Price" >
|
||||
<JnpfInput v-model="dataForm.bucket7Price" @change="changeData('bucket7Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="8号桶价格" prop="bucket8Price" >
|
||||
<JnpfInput v-model="dataForm.bucket8Price" @change="changeData('bucket8Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="9号桶价格" prop="bucket9Price" >
|
||||
<JnpfInput v-model="dataForm.bucket9Price" @change="changeData('bucket9Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="10号桶价格" prop="bucket10Price" >
|
||||
<JnpfInput v-model="dataForm.bucket10Price" @change="changeData('bucket10Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="11号桶价格" prop="bucket11Price" >
|
||||
<JnpfInput v-model="dataForm.bucket11Price" @change="changeData('bucket11Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="12号桶价格" prop="bucket12Price" >
|
||||
<JnpfInput v-model="dataForm.bucket12Price" @change="changeData('bucket12Price',-1)"
|
||||
placeholder="请输入金额" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设备配置" name="2">
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="投递审核配置 " tipLabel="投递后审核结算" prop="deliveryAdjustSet" >
|
||||
<JnpfRadio v-model="dataForm.deliveryAdjustSet" @change="changeData('deliveryAdjustSet',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="deliveryAdjustSetOptions" :props="deliveryAdjustSetProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="手机号登录" tipLabel="投递柜手机号登录入库" prop="allowPhoneLogin" >
|
||||
<JnpfRadio v-model="dataForm.allowPhoneLogin" @change="changeData('allowPhoneLogin',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="allowPhoneLoginOptions" :props="allowPhoneLoginProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="清运锁" tipLabel="清运时是否输入垃圾袋编号" prop="cleanLock" >
|
||||
<JnpfRadio v-model="dataForm.cleanLock" @change="changeData('cleanLock',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="cleanLockOptions" :props="cleanLockProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="清运审核配置" tipLabel="清运数据审核入库" prop="cleanAdjustSet" >
|
||||
<JnpfRadio v-model="dataForm.cleanAdjustSet" @change="changeData('cleanAdjustSet',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="cleanAdjustSetOptions" :props="cleanAdjustSetProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="烟雾报警" tipLabel="烟雾报警事件上报" prop="smogSet" >
|
||||
<JnpfRadio v-model="dataForm.smogSet" @change="changeData('smogSet',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="smogSetOptions" :props="smogSetProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="投递关门" prop="closeDelay" >
|
||||
<JnpfInput v-model="dataForm.closeDelay" @change="changeData('closeDelay',-1)"
|
||||
placeholder="请输入" addonAfter="秒" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="满溢报警" tipLabel="满溢时发送通知" prop="fullSet" >
|
||||
<JnpfRadio v-model="dataForm.fullSet" @change="changeData('fullSet',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="fullSetOptions" :props="fullSetProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="报警重量" prop="warningWeight" >
|
||||
<JnpfInput v-model="dataForm.warningWeight" @change="changeData('warningWeight',-1)"
|
||||
placeholder="请输入" addonAfter="KG" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="宣传配置" name="BwNYw72">
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item>
|
||||
<JnpfAlert
|
||||
title='温馨提示' description="开启宣传配置后,投递柜将在空闲时播报宣传标语,播放宣传海报" showIcon type='success'>
|
||||
</JnpfAlert>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="宣传配置" tipLabel="开启空闲设备宣传" prop="promotionSet" >
|
||||
<JnpfRadio v-model="dataForm.promotionSet" @change="changeData('promotionSet',-1)"
|
||||
optionType="button" direction="horizontal" size="small" :options="promotionSetOptions" :props="promotionSetProps" >
|
||||
</JnpfRadio>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item
|
||||
label="宣传标语" tipLabel="宣传标语" prop="promotionalSlogans" >
|
||||
<JnpfTextarea v-model="dataForm.promotionalSlogans" @change="changeData('promotionalSlogans',-1)"
|
||||
placeholder="请输入设备空闲时希望播放的宣传内容" :maxlength="500" :style='{"width":"100%"}' true type="textarea" :autosize='{"minRows":2,"maxRows":4}' >
|
||||
</JnpfTextarea>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item
|
||||
label="宣传海报" tipLabel="设备空闲时展示海报" prop="promotionPic1" >
|
||||
<JnpfUploadImg v-model="dataForm.promotionPic1" @change="changeData('promotionPic1',-1)"
|
||||
:fileSize="2" sizeUnit="MB" :limit="5" pathType="defaultPath" :isAccount="0" >
|
||||
</JnpfUploadImg>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="修改用户" prop="lastModifyUserId" >
|
||||
<JnpfInput v-model="dataForm.lastModifyUserId" @change="changeData('lastModifyUserId',-1)"
|
||||
placeholder="系统自动生成" readonly :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item
|
||||
label="修改时间" prop="lastModifyTime" >
|
||||
<JnpfInput v-model="dataForm.lastModifyTime" @change="changeData('lastModifyTime',-1)"
|
||||
placeholder="系统自动生成" readonly :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<!-- 表单结束 -->
|
||||
</template>
|
||||
</el-form>
|
||||
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
|
||||
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {mapGetters} from "vuex";
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
|
||||
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
||||
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: { },
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
dataFormSubmitType: 0,
|
||||
continueBtnLoading: false,
|
||||
index: 0,
|
||||
prevDis: false,
|
||||
nextDis: false,
|
||||
allList: [],
|
||||
visible: false,
|
||||
loading: false,
|
||||
btnLoading: false,
|
||||
formRef: 'formRef',
|
||||
setting:{},
|
||||
eventType: '',
|
||||
userBoxVisible:false,
|
||||
selectDialogVisible: false,
|
||||
currTableConf:{},
|
||||
dataValueAll:{},
|
||||
addTableConf:{
|
||||
},
|
||||
//可选范围默认值
|
||||
ableAll:{
|
||||
},
|
||||
tableRows:{
|
||||
},
|
||||
Vmodel:"",
|
||||
currVmodel:"",
|
||||
dataForm: {
|
||||
deliveryPrice : undefined,
|
||||
bucket1Price : undefined,
|
||||
bucket2Price : undefined,
|
||||
bucket3Price : undefined,
|
||||
bucket4Price : undefined,
|
||||
bucket5Price : undefined,
|
||||
bucket6Price : undefined,
|
||||
bucket7Price : undefined,
|
||||
bucket8Price : undefined,
|
||||
bucket9Price : undefined,
|
||||
bucket10Price : undefined,
|
||||
bucket11Price : undefined,
|
||||
bucket12Price : undefined,
|
||||
deliveryAdjustSet : undefined,
|
||||
allowPhoneLogin : undefined,
|
||||
cleanLock : undefined,
|
||||
cleanAdjustSet : undefined,
|
||||
smogSet : undefined,
|
||||
closeDelay : undefined,
|
||||
fullSet : undefined,
|
||||
warningWeight : undefined,
|
||||
promotionSet : undefined,
|
||||
promotionalSlogans : undefined,
|
||||
promotionPic1 : [],
|
||||
lastModifyUserId : undefined,
|
||||
lastModifyTime : undefined,
|
||||
organizeJsonId : undefined,
|
||||
},
|
||||
tableRequiredData: {},
|
||||
activebufuev:["1","2","BwNYw72"],
|
||||
dataRule:
|
||||
{
|
||||
deliveryPrice: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket1Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket2Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket3Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket4Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket5Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket6Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket7Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket8Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket9Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket10Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket11Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
bucket12Price: [
|
||||
{
|
||||
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
deliveryAdjustSet: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
allowPhoneLogin: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
cleanLock: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
cleanAdjustSet: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
smogSet: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
fullSet: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
warningWeight: [
|
||||
{
|
||||
pattern: /^\d+$/,
|
||||
message: '请输入正确的重量',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
promotionSet: [
|
||||
{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
},
|
||||
deliveryAdjustSetOptions:[{"fullName":"即时自动","id":"1"},{"fullName":"24H自动","id":"2"},{"fullName":"48H自动","id":"3"}],
|
||||
deliveryAdjustSetProps:{"label":"fullName","value":"id" },
|
||||
allowPhoneLoginOptions:[],
|
||||
allowPhoneLoginProps:{"label":"fullName","value":"enCode" },
|
||||
cleanLockOptions:[],
|
||||
cleanLockProps:{"label":"fullName","value":"enCode" },
|
||||
cleanAdjustSetOptions:[{"fullName":"自动","id":"1"},{"fullName":"手动","id":"2"}],
|
||||
cleanAdjustSetProps:{"label":"fullName","value":"id" },
|
||||
smogSetOptions:[],
|
||||
smogSetProps:{"label":"fullName","value":"enCode" },
|
||||
fullSetOptions:[],
|
||||
fullSetProps:{"label":"fullName","value":"enCode" },
|
||||
promotionSetOptions:[],
|
||||
promotionSetProps:{"label":"fullName","value":"enCode" },
|
||||
childIndex:-1,
|
||||
isEdit:false,
|
||||
interfaceRes: {
|
||||
deliveryPrice:[] ,
|
||||
bucket1Price:[] ,
|
||||
bucket2Price:[] ,
|
||||
bucket3Price:[] ,
|
||||
bucket4Price:[] ,
|
||||
bucket5Price:[] ,
|
||||
bucket6Price:[] ,
|
||||
bucket7Price:[] ,
|
||||
bucket8Price:[] ,
|
||||
bucket9Price:[] ,
|
||||
bucket10Price:[] ,
|
||||
bucket11Price:[] ,
|
||||
bucket12Price:[] ,
|
||||
deliveryAdjustSet:[] ,
|
||||
allowPhoneLogin:[] ,
|
||||
cleanLock:[] ,
|
||||
cleanAdjustSet:[] ,
|
||||
smogSet:[] ,
|
||||
closeDelay:[] ,
|
||||
fullSet:[] ,
|
||||
warningWeight:[] ,
|
||||
promotionSet:[] ,
|
||||
promotionalSlogans:[] ,
|
||||
promotionPic1:[] ,
|
||||
lastModifyUserId:[] ,
|
||||
lastModifyTime:[] ,
|
||||
organizeJsonId:[] ,
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.dataAll()
|
||||
this.initDefaultData()
|
||||
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
prev() {
|
||||
this.index--
|
||||
if (this.index === 0) {
|
||||
this.prevDis = true
|
||||
}
|
||||
this.nextDis = false
|
||||
for (let index = 0; index < this.allList.length; index++) {
|
||||
const element = this.allList[index];
|
||||
if (this.index == index) {
|
||||
this.getInfo(element.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
next() {
|
||||
this.index++
|
||||
if (this.index === this.allList.length - 1) {
|
||||
this.nextDis = true
|
||||
}
|
||||
this.prevDis = false
|
||||
for (let index = 0; index < this.allList.length; index++) {
|
||||
const element = this.allList[index];
|
||||
if (this.index == index) {
|
||||
this.getInfo(element.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
getInfo(id) {
|
||||
request({
|
||||
url: '/api/scm/RecycleDeviceConfigOne/'+ id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList', true)
|
||||
},
|
||||
changeData(model, index) {
|
||||
this.isEdit = false
|
||||
this.childIndex = index
|
||||
let modelAll = model.split("-");
|
||||
let faceMode = "";
|
||||
for (let i = 0; i < modelAll.length; i++) {
|
||||
faceMode += modelAll[i];
|
||||
}
|
||||
for (let key in this.interfaceRes) {
|
||||
if (key != faceMode) {
|
||||
let faceReList = this.interfaceRes[key]
|
||||
for (let i = 0; i < faceReList.length; i++) {
|
||||
if (faceReList[i].relationField == model) {
|
||||
let options = 'get' + key + 'Options';
|
||||
if(this[options]){
|
||||
this[options]()
|
||||
}
|
||||
this.changeData(key, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
changeDataFormData(type, data, model,index,defaultValue) {
|
||||
if(!this.isEdit) {
|
||||
if (type == 2) {
|
||||
for (let i = 0; i < this.dataForm[data].length; i++) {
|
||||
if (index == -1) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
} else if (index == i) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.dataForm[data] = defaultValue
|
||||
}
|
||||
}
|
||||
},
|
||||
dataAll(){
|
||||
this.getallowPhoneLoginOptions();
|
||||
this.getcleanLockOptions();
|
||||
this.getsmogSetOptions();
|
||||
this.getfullSetOptions();
|
||||
this.getpromotionSetOptions();
|
||||
},
|
||||
getallowPhoneLoginOptions() {
|
||||
getDictionaryDataSelector('565902955111256581').then(res => {
|
||||
this.allowPhoneLoginOptions = res.data.list
|
||||
})
|
||||
},
|
||||
getcleanLockOptions() {
|
||||
getDictionaryDataSelector('565902955111256581').then(res => {
|
||||
this.cleanLockOptions = res.data.list
|
||||
})
|
||||
},
|
||||
getsmogSetOptions() {
|
||||
getDictionaryDataSelector('565902955111256581').then(res => {
|
||||
this.smogSetOptions = res.data.list
|
||||
})
|
||||
},
|
||||
getfullSetOptions() {
|
||||
getDictionaryDataSelector('565902955111256581').then(res => {
|
||||
this.fullSetOptions = res.data.list
|
||||
})
|
||||
},
|
||||
getpromotionSetOptions() {
|
||||
getDictionaryDataSelector('565902955111256581').then(res => {
|
||||
this.promotionSetOptions = res.data.list
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
clearData(){
|
||||
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
||||
},
|
||||
init(id,isDetail,allList) {
|
||||
this.prevDis = false
|
||||
this.nextDis = false
|
||||
this.allList = allList || []
|
||||
if (allList.length) {
|
||||
this.index = this.allList.findIndex(item => item.id === id)
|
||||
if (this.index == 0) {
|
||||
this.prevDis = true
|
||||
}
|
||||
if (this.index == this.allList.length - 1) {
|
||||
this.nextDis = true
|
||||
}
|
||||
} else {
|
||||
this.prevDis = true
|
||||
this.nextDis = true
|
||||
}
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/scm/RecycleDeviceConfigOne/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
}else{
|
||||
this.clearData()
|
||||
this.initDefaultData()
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
//初始化默认数据
|
||||
initDefaultData() {
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit(type) {
|
||||
this.dataFormSubmitType = type ? type : 0
|
||||
this.$refs['formRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
let _data =this.dataList()
|
||||
if (this.dataFormSubmitType == 2) {
|
||||
this.continueBtnLoading = true
|
||||
} else {
|
||||
this.btnLoading = true
|
||||
}
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/scm/RecycleDeviceConfigOne',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
if (this.dataFormSubmitType == 2) {
|
||||
this.$nextTick(() => {
|
||||
this.clearData()
|
||||
this.initDefaultData()
|
||||
})
|
||||
this.continueBtnLoading = false
|
||||
return
|
||||
}
|
||||
this.visible = false
|
||||
this.btnLoading = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
}).catch(()=>{
|
||||
this.btnLoading = false
|
||||
this.continueBtnLoading = false
|
||||
})
|
||||
}else{
|
||||
request({
|
||||
url: '/api/scm/RecycleDeviceConfigOne/'+this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
|
||||
this.visible = false
|
||||
this.btnLoading = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
}).catch(()=>{
|
||||
this.btnLoading = false
|
||||
this.continueBtnLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
openSelectDialog(key) {
|
||||
this.currTableConf=this.addTableConf[key]
|
||||
this.currVmodel=key
|
||||
this.selectDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.selectDialog.init()
|
||||
})
|
||||
},
|
||||
addForSelect(data) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let t = data[i]
|
||||
if(this['get'+this.currVmodel]){
|
||||
this['get'+this.currVmodel](t)
|
||||
}
|
||||
}
|
||||
},
|
||||
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||
let timeDataValue = null;
|
||||
let timeValue = Number(timeValueData)
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = new Date().getTime()
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getBeforeData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getLaterData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
||||
let timeDataValue = null
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue || '00:00:00'
|
||||
if (timeDataValue.split(':').length == 3) {
|
||||
timeDataValue = timeDataValue
|
||||
} else {
|
||||
timeDataValue = timeDataValue + ':00'
|
||||
}
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = this.jnpf.toDate(new Date(), format)
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
previousDate = getBeforeTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
previousDate = getLaterTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
dataList(){
|
||||
var _data = this.dataForm;
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
this.isEdit = true
|
||||
this.dataAll()
|
||||
this.childIndex=-1
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue