|
@@ -6,8 +6,8 @@
|
|
:rules="rules"
|
|
:rules="rules"
|
|
label-width="130px"
|
|
label-width="130px"
|
|
>
|
|
>
|
|
- <el-form-item label="油站名称" prop="stationName" v-show="false">
|
|
|
|
- <el-input v-model="ruleForm.stationName" placeholder="请输入油站名称" />
|
|
|
|
|
|
+ <el-form-item label="油站名称" prop="deptName" v-show="false">
|
|
|
|
+ <el-input v-model="ruleForm.deptName" placeholder="请输入油站名称" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="首页轮播图" prop="payMode">
|
|
<el-form-item label="首页轮播图" prop="payMode">
|
|
<el-upload
|
|
<el-upload
|
|
@@ -17,7 +17,7 @@
|
|
:headers="headers"
|
|
:headers="headers"
|
|
multiple
|
|
multiple
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
- :limit="4"
|
|
|
|
|
|
+ :limit="5"
|
|
:file-list="ruleForm.imgFileList"
|
|
:file-list="ruleForm.imgFileList"
|
|
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
|
|
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
|
|
:before-upload="beforeAvatarUpload"
|
|
:before-upload="beforeAvatarUpload"
|
|
@@ -27,7 +27,7 @@
|
|
>
|
|
>
|
|
<i class="el-icon-plus"></i>
|
|
<i class="el-icon-plus"></i>
|
|
<div class="el-upload__tip" slot="tip">
|
|
<div class="el-upload__tip" slot="tip">
|
|
- 只能上传图片文件,单张图片不要太大
|
|
|
|
|
|
+ 只能上传图片文件,单张图片大小不能超过 2MB
|
|
</div>
|
|
</div>
|
|
</el-upload>
|
|
</el-upload>
|
|
<el-dialog :visible.sync="dialogVisible" append-to-body>
|
|
<el-dialog :visible.sync="dialogVisible" append-to-body>
|
|
@@ -44,32 +44,21 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="班结是否打印">
|
|
<el-form-item label="班结是否打印">
|
|
<el-radio-group v-model="ruleForm.wsPrintFlag">
|
|
<el-radio-group v-model="ruleForm.wsPrintFlag">
|
|
- <el-radio
|
|
|
|
- v-for="dict in wsPrintFlagOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- >{{ dict.dictLabel }}</el-radio
|
|
|
|
- >
|
|
|
|
|
|
+ <el-radio label="1">打印</el-radio>
|
|
|
|
+ <el-radio label="2">不打印</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="小票打印模板">
|
|
<el-form-item label="小票打印模板">
|
|
<el-radio-group v-model="ruleForm.printSetting">
|
|
<el-radio-group v-model="ruleForm.printSetting">
|
|
- <el-radio
|
|
|
|
- v-for="dict in printSettingOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- >{{ dict.dictLabel }}</el-radio
|
|
|
|
- >
|
|
|
|
|
|
+ <el-radio label="1">客户联</el-radio>
|
|
|
|
+ <el-radio label="2">商户联</el-radio>
|
|
|
|
+ <el-radio label="3">客户联和商户联</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="兑换积分小票打印">
|
|
<el-form-item label="兑换积分小票打印">
|
|
<el-radio-group v-model="ruleForm.integralPrintFlag">
|
|
<el-radio-group v-model="ruleForm.integralPrintFlag">
|
|
- <el-radio
|
|
|
|
- v-for="dict in integralPrintFlagOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- >{{ dict.dictLabel }}</el-radio
|
|
|
|
- >
|
|
|
|
|
|
+ <el-radio label="1">是</el-radio>
|
|
|
|
+ <el-radio label="0">否</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -87,11 +76,6 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
- wsPrintFlagOptions: [],
|
|
|
|
- printSettingOptions: [],
|
|
|
|
- cardEnabledFlagOptions: [],
|
|
|
|
- discountSettingOptions: [],
|
|
|
|
- isNoOilOptions: [],
|
|
|
|
integralPrintFlagOptions: [],
|
|
integralPrintFlagOptions: [],
|
|
deleteImgFileList: [], //存已被删除了的图片的id
|
|
deleteImgFileList: [], //存已被删除了的图片的id
|
|
dialogImageUrl: "",
|
|
dialogImageUrl: "",
|
|
@@ -102,52 +86,31 @@ export default {
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {},
|
|
rules: {},
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
- addressUrl: process.env.VUE_APP_BASE_API + "/common/upload",
|
|
|
|
|
|
+ addressUrl: location.protocol +"//" +location.host +process.env.VUE_APP_BASE_API + "/common/upload",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getInfo();
|
|
this.getInfo();
|
|
- this.getDicts("ws_print_flag").then((response) => {
|
|
|
|
- this.wsPrintFlagOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("print_setting_flag").then((response) => {
|
|
|
|
- this.printSettingOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("card_enabled_flag").then((response) => {
|
|
|
|
- this.cardEnabledFlagOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("discount_setting").then((response) => {
|
|
|
|
- this.discountSettingOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("is_flag").then((response) => {
|
|
|
|
- this.isNoOilOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("is_flag").then((response) => {
|
|
|
|
- this.integralPrintFlagOptions = response.data;
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
this.ruleForm.imgFileList = fileList;
|
|
this.ruleForm.imgFileList = fileList;
|
|
},
|
|
},
|
|
beforeAvatarUpload(file) {
|
|
beforeAvatarUpload(file) {
|
|
- // const isType = file.type === "image/jpeg" || "image/png";
|
|
|
|
- const isLt5M = file.size / 1024 / 1024 < 5;
|
|
|
|
- // if (!isType) {
|
|
|
|
- // this.$message.error("上传头像图片只能是 JPG 或 PNG格式!");
|
|
|
|
- // }
|
|
|
|
|
|
+ const isLt5M = file.size / 1024 / 1024 < 2;
|
|
if (!isLt5M) {
|
|
if (!isLt5M) {
|
|
- this.$message.error("上传头像图片大小不能超过 5MB!");
|
|
|
|
|
|
+ this.$message.error("上传头像图片大小不能超过 2MB!");
|
|
}
|
|
}
|
|
return isLt5M;
|
|
return isLt5M;
|
|
},
|
|
},
|
|
//上传成功
|
|
//上传成功
|
|
handlepaymentSuccess(response, file, fileList) {
|
|
handlepaymentSuccess(response, file, fileList) {
|
|
|
|
+ console.log("img",response);
|
|
this.ruleForm.imgFileList = [
|
|
this.ruleForm.imgFileList = [
|
|
...this.ruleForm.imgFileList,
|
|
...this.ruleForm.imgFileList,
|
|
{
|
|
{
|
|
name: file.name,
|
|
name: file.name,
|
|
- url: process.env.VUE_APP_BASE_API + response.fileName,
|
|
|
|
|
|
+ url: response.url,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
},
|
|
},
|
|
@@ -166,7 +129,7 @@ export default {
|
|
submitForm() {
|
|
submitForm() {
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (this.ruleForm.payId != null) {
|
|
|
|
|
|
+ if (this.ruleForm.deptId != null) {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
this.msgSuccess("修改配置成功");
|
|
this.msgSuccess("修改配置成功");
|
|
this.getInfo();
|
|
this.getInfo();
|