|
@@ -14,7 +14,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tabs">
|
|
|
- <a :class="[typeValue===item.value?'active':'']" @click="handleChangeTabs(item.value)" v-for="item in typeList" :key="item.value">{{item.label}}</a>
|
|
|
+ <a :class="[typeValue===item.study_phase?'active':'']" @click="handleChangeTabs(item.study_phase)" v-for="item in $studyType" :key="item.study_phase">{{item.study_phase_name}}</a>
|
|
|
</div>
|
|
|
<el-table
|
|
|
class="search-table order-table"
|
|
@@ -28,28 +28,28 @@
|
|
|
width="64">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="period"
|
|
|
+ prop="period_num"
|
|
|
label="总期数"
|
|
|
width="152">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.period" placeholder="输入" maxlength="20"></el-input>
|
|
|
+ <el-input v-model="scope.row.period_num" placeholder="输入" maxlength="20"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="issue"
|
|
|
+ prop="comb_count"
|
|
|
label="合刊"
|
|
|
width="152">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.issue" placeholder="0" maxlength="20"></el-input>
|
|
|
+ <el-input v-model="scope.row.comb_count" placeholder="1" maxlength="20"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="shelve_date"
|
|
|
label="发行日期"
|
|
|
width="152" >
|
|
|
<template slot-scope="scope">
|
|
|
<el-date-picker
|
|
|
- v-model="scope.row.date"
|
|
|
+ v-model="scope.row.shelve_date"
|
|
|
prefix-icon="-"
|
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
@@ -90,6 +90,7 @@ import NavMenu from "../../components/NavMenu.vue"
|
|
|
import Breadcrumb from '../../components/Breadcrumb.vue';
|
|
|
import { getLogin } from "@/api/ajax";
|
|
|
import { cutMoneyFiter } from '@/utils/defined';
|
|
|
+import { mapState } from 'vuex';
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
@@ -121,38 +122,12 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
loading: false,
|
|
|
- typeValue: 'huakan',
|
|
|
- typeList: [
|
|
|
- {
|
|
|
- value: 'huakan',
|
|
|
- label: '画刊'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'xiaoxue',
|
|
|
- label: '小学'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'chuyi',
|
|
|
- label: '初一'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'chuer',
|
|
|
- label: '初二'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'chusan',
|
|
|
- label: '初三'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'gaoyi',
|
|
|
- label: '高一'
|
|
|
- }
|
|
|
- ],
|
|
|
+ typeValue: 11,
|
|
|
tableList:[
|
|
|
{
|
|
|
- period: '',
|
|
|
- issue: '',
|
|
|
- date: '',
|
|
|
+ period_num: '',
|
|
|
+ comb_count: '',
|
|
|
+ shelve_date: '',
|
|
|
price: ''
|
|
|
}
|
|
|
],
|
|
@@ -161,7 +136,7 @@ export default {
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
computed: {
|
|
|
-
|
|
|
+ ...mapState(['$studyType', 'file_preview_url']),
|
|
|
},
|
|
|
//监控data中数据变化
|
|
|
watch: {
|
|
@@ -171,33 +146,36 @@ export default {
|
|
|
methods: {
|
|
|
handleChangeTabs(value){
|
|
|
this.typeValue = value
|
|
|
+ this.getInfo()
|
|
|
},
|
|
|
// 去掉前后空格
|
|
|
handleTrim(form,fild){
|
|
|
this[form][fild] = this[form][fild].trim()
|
|
|
},
|
|
|
// 提交表单
|
|
|
- onSubmit(formName){
|
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.loading = true
|
|
|
- let MethodName = "/OrgServer/Manager/SysConfigManager/SetSysConfig_SharePath";
|
|
|
- let data = {
|
|
|
- article_share_url_path: this.registerForm.article_share_url_path
|
|
|
- }
|
|
|
- getLogin(MethodName, data)
|
|
|
- .then((res) => {
|
|
|
- this.loading = false
|
|
|
- if(res.status===1){
|
|
|
- this.$message.success("保存成功")
|
|
|
- }
|
|
|
- }).catch((res) =>{
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
+ onSubmit(){
|
|
|
+ this.loading = true
|
|
|
+ let MethodName = "/OrgServer/Manager/ReservationPriceManager/SaveReservationPriceList";
|
|
|
+ let table = JSON.parse(JSON.stringify(this.tableList))
|
|
|
+ table.forEach(item => {
|
|
|
+ item.comb_count = item.comb_count ? item.comb_count * 1 : 1
|
|
|
+ item.price = item.price * 1
|
|
|
+ item.period_num = item.period_num *1
|
|
|
});
|
|
|
+ let data = {
|
|
|
+ goods_type: 2,
|
|
|
+ goods_study_phase: this.typeValue,
|
|
|
+ reservation_price_list: table
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false
|
|
|
+ if(res.status===1){
|
|
|
+ this.$message.success("保存成功")
|
|
|
+ }
|
|
|
+ }).catch((res) =>{
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 取消 恢复到修改前状态
|
|
|
onCancel(){
|
|
@@ -205,11 +183,14 @@ export default {
|
|
|
},
|
|
|
// 得到配置信息
|
|
|
getInfo(){
|
|
|
- let MethodName = "/OrgServer/Manager/SysConfigManager/GetSysConfig_SharePath";
|
|
|
- getLogin(MethodName, {})
|
|
|
+ let MethodName = "/OrgServer/Manager/ReservationPriceManager/GetReservationPriceList";
|
|
|
+ getLogin(MethodName, {
|
|
|
+ goods_type: 2,
|
|
|
+ goods_study_phase: this.typeValue
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
if(res.status===1){
|
|
|
-
|
|
|
+ this.tableList = res.reservation_price_list
|
|
|
}
|
|
|
}).catch((res) =>{
|
|
|
|
|
@@ -238,9 +219,9 @@ export default {
|
|
|
}else{
|
|
|
for(let i = 0; i < Number(type); i++){
|
|
|
let obj = {
|
|
|
- period: '',
|
|
|
- issue: '',
|
|
|
- date: '',
|
|
|
+ period_num: '',
|
|
|
+ comb_count: '',
|
|
|
+ shelve_date: '',
|
|
|
price: ''
|
|
|
}
|
|
|
this.tableList.push(obj)
|
|
@@ -255,7 +236,6 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
-
|
|
|
},
|
|
|
//生命周期-创建之前
|
|
|
beforeCreated() { },
|