优化平台配置
This commit is contained in:
@@ -76,6 +76,8 @@ const editSystemConfig = (params)=>putAction("/systemConfig/update",params);
|
|||||||
const checkSystemConfig = (params)=>getAction("/systemConfig/checkIsNameExist",params);
|
const checkSystemConfig = (params)=>getAction("/systemConfig/checkIsNameExist",params);
|
||||||
const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
|
const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
|
||||||
const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);
|
const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);
|
||||||
|
//平台参数
|
||||||
|
const getPlatformConfigByKey = (params)=>getAction("/platformConfig/getPlatformConfigByKey",params);
|
||||||
//用户|角色|模块关系
|
//用户|角色|模块关系
|
||||||
const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
|
const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
|
||||||
const editUserBusiness = (params)=>putAction("/userBusiness/update",params);
|
const editUserBusiness = (params)=>putAction("/userBusiness/update",params);
|
||||||
@@ -158,6 +160,7 @@ export {
|
|||||||
checkSystemConfig,
|
checkSystemConfig,
|
||||||
getCurrentSystemConfig,
|
getCurrentSystemConfig,
|
||||||
fileSizeLimit,
|
fileSizeLimit,
|
||||||
|
getPlatformConfigByKey,
|
||||||
addUserBusiness,
|
addUserBusiness,
|
||||||
editUserBusiness,
|
editUserBusiness,
|
||||||
checkUserBusiness,
|
checkUserBusiness,
|
||||||
|
|||||||
@@ -11,20 +11,21 @@
|
|||||||
wrapClassName="ant-modal-cust-warp"
|
wrapClassName="ant-modal-cust-warp"
|
||||||
style="top:5%;height: 100%;overflow-y: hidden">
|
style="top:5%;height: 100%;overflow-y: hidden">
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
|
<a-button v-if="billPrintFlag" @click="handlePrint">三联打印预览</a-button>
|
||||||
<!--此处为解决缓存问题-->
|
<!--此处为解决缓存问题-->
|
||||||
<a-button v-if="billType === '调拨出库'" v-print="'#allocationOutPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '调拨出库'" v-print="'#allocationOutPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '组装单'" v-print="'#assemblePrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '组装单'" v-print="'#assemblePrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '拆卸单'" v-print="'#disassemblePrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '拆卸单'" v-print="'#disassemblePrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '其它入库'" v-print="'#otherInPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '其它入库'" v-print="'#otherInPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '其它出库'" v-print="'#otherOutPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '其它出库'" v-print="'#otherOutPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '销售退货入库'" v-print="'#saleBackPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '销售退货入库'" v-print="'#saleBackPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '销售订单'" v-print="'#saleOrderPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '销售订单'" v-print="'#saleOrderPrint'">普通打印</a-button>
|
||||||
<a-button v-if="billType === '销售出库'" v-print="'#saleOutPrint'" ghost type="primary">打印</a-button>
|
<a-button v-if="billType === '销售出库'" v-print="'#saleOutPrint'">普通打印</a-button>
|
||||||
<a-button key="back" @click="handleCancel">取消</a-button>
|
<a-button key="back" @click="handleCancel">取消</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
@@ -833,19 +834,22 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-form>
|
</a-form>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
|
<bill-print-iframe ref="modalDetail"></bill-print-iframe>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import { findBillDetailByNumber} from '@/api/api'
|
import { findBillDetailByNumber, getPlatformConfigByKey} from '@/api/api'
|
||||||
import { getMpListShort } from "@/utils/util"
|
import { getMpListShort } from "@/utils/util"
|
||||||
|
import BillPrintIframe from './BillPrintIframe'
|
||||||
import JUpload from '@/components/jeecg/JUpload'
|
import JUpload from '@/components/jeecg/JUpload'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'BillDetail',
|
name: 'BillDetail',
|
||||||
components: {
|
components: {
|
||||||
|
BillPrintIframe,
|
||||||
JUpload
|
JUpload
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -855,6 +859,7 @@
|
|||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
billType: '',
|
billType: '',
|
||||||
|
billPrintFlag: false,
|
||||||
fileList: [],
|
fileList: [],
|
||||||
tableWidth: {
|
tableWidth: {
|
||||||
'width': '1550px'
|
'width': '1550px'
|
||||||
@@ -1095,6 +1100,13 @@
|
|||||||
created () {
|
created () {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initPlatform() {
|
||||||
|
getPlatformConfigByKey( {"platformKey": "bill_print_flag"}).then((res)=> {
|
||||||
|
if (res && res.code == 200) {
|
||||||
|
this.billPrintFlag = res.data.platformValue==='1'?true:false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
show(record, type) {
|
show(record, type) {
|
||||||
this.billType = type
|
this.billType = type
|
||||||
//附件下载
|
//附件下载
|
||||||
@@ -1111,6 +1123,7 @@
|
|||||||
}
|
}
|
||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params);
|
this.requestSubTableData(url, params);
|
||||||
|
this.initPlatform()
|
||||||
},
|
},
|
||||||
requestSubTableData(url, params, success) {
|
requestSubTableData(url, params, success) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -1138,6 +1151,11 @@
|
|||||||
this.title = res.data.subType + type + "-详情";
|
this.title = res.data.subType + type + "-详情";
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
//三联打印预览
|
||||||
|
handlePrint() {
|
||||||
|
this.$refs.modalDetail.show(this.model, this.billType);
|
||||||
|
this.$refs.modalDetail.title=this.billType + "-三联打印预览";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
57
jshERP-web/src/views/bill/dialog/BillPrintIframe.vue
Normal file
57
jshERP-web/src/views/bill/dialog/BillPrintIframe.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||||
|
import {mixinDevice} from '@/utils/mixin.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BillPrintIframe",
|
||||||
|
inject:['closeCurrent'],
|
||||||
|
mixins: [mixinDevice],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
url: "",
|
||||||
|
id:"",
|
||||||
|
height: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.goUrl()
|
||||||
|
},
|
||||||
|
updated () {
|
||||||
|
this.goUrl()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, from) {
|
||||||
|
this.goUrl();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
show(record, type) {
|
||||||
|
|
||||||
|
},
|
||||||
|
goUrl () {
|
||||||
|
let url = this.$route.meta.url
|
||||||
|
this.id = this.$route.path
|
||||||
|
if (this.isMobile()) {
|
||||||
|
this.height = 800
|
||||||
|
} else {
|
||||||
|
this.height = document.documentElement.clientHeight-130
|
||||||
|
}
|
||||||
|
console.log("------url------"+url)
|
||||||
|
console.log("------token------"+Vue.ls.get(ACCESS_TOKEN))
|
||||||
|
if (url !== null && url !== undefined) {
|
||||||
|
//外部url加入token
|
||||||
|
let token = Vue.ls.get(ACCESS_TOKEN);
|
||||||
|
this.url = url + '?token=' + token;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import {addPerson,editPerson,checkPerson } from '@/api/api'
|
import {getPlatformConfigByKey } from '@/api/api'
|
||||||
import { getAction, postAction } from '../../../api/manage'
|
import { getAction, postAction } from '../../../api/manage'
|
||||||
export default {
|
export default {
|
||||||
name: "PluginModal",
|
name: "PluginModal",
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
getAction("/plugin/getMacWithSecret").then((res)=>{
|
getAction("/plugin/getMacWithSecret").then((res)=>{
|
||||||
if(res && res.code == 200) {
|
if(res && res.code == 200) {
|
||||||
this.model.platformKey = res.data
|
this.model.platformKey = res.data
|
||||||
getAction("/platformConfig/getPlatformConfigByKey", {"platformKey": "activation_code"}).then((res)=>{
|
getPlatformConfigByKey( {"platformKey": "activation_code"}).then((res)=>{
|
||||||
if(res && res.code == 200) {
|
if(res && res.code == 200) {
|
||||||
this.model.platformValue = res.data.platformValue
|
this.model.platformValue = res.data.platformValue
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user