优化平台配置

This commit is contained in:
季圣华
2021-09-13 00:59:16 +08:00
parent 6d8e9177f7
commit e8acccd4ac
4 changed files with 94 additions and 16 deletions

View File

@@ -76,6 +76,8 @@ const editSystemConfig = (params)=>putAction("/systemConfig/update",params);
const checkSystemConfig = (params)=>getAction("/systemConfig/checkIsNameExist",params);
const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);
//平台参数
const getPlatformConfigByKey = (params)=>getAction("/platformConfig/getPlatformConfigByKey",params);
//用户|角色|模块关系
const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
const editUserBusiness = (params)=>putAction("/userBusiness/update",params);
@@ -158,6 +160,7 @@ export {
checkSystemConfig,
getCurrentSystemConfig,
fileSizeLimit,
getPlatformConfigByKey,
addUserBusiness,
editUserBusiness,
checkUserBusiness,

View File

@@ -11,20 +11,21 @@
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<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="'#assemblePrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '拆卸单'" v-print="'#disassemblePrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '其它入库'" v-print="'#otherInPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '其它出库'" v-print="'#otherOutPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '销售退货入库'" v-print="'#saleBackPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '销售订单'" v-print="'#saleOrderPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '销售出库'" v-print="'#saleOutPrint'" ghost type="primary">打印</a-button>
<a-button v-if="billType === '调拨出库'" v-print="'#allocationOutPrint'">普通打印</a-button>
<a-button v-if="billType === '组装单'" v-print="'#assemblePrint'">普通打印</a-button>
<a-button v-if="billType === '拆卸单'" v-print="'#disassemblePrint'">普通打印</a-button>
<a-button v-if="billType === '其它入库'" v-print="'#otherInPrint'">普通打印</a-button>
<a-button v-if="billType === '其它出库'" v-print="'#otherOutPrint'">普通打印</a-button>
<a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'">普通打印</a-button>
<a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'">普通打印</a-button>
<a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'">普通打印</a-button>
<a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'">普通打印</a-button>
<a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'">普通打印</a-button>
<a-button v-if="billType === '销售退货入库'" v-print="'#saleBackPrint'">普通打印</a-button>
<a-button v-if="billType === '销售订单'" v-print="'#saleOrderPrint'">普通打印</a-button>
<a-button v-if="billType === '销售出库'" v-print="'#saleOutPrint'">普通打印</a-button>
<a-button key="back" @click="handleCancel">取消</a-button>
</template>
<a-form :form="form">
@@ -833,19 +834,22 @@
</template>
</a-form>
</j-modal>
<bill-print-iframe ref="modalDetail"></bill-print-iframe>
</a-card>
</template>
<script>
import pick from 'lodash.pick'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber} from '@/api/api'
import { findBillDetailByNumber, getPlatformConfigByKey} from '@/api/api'
import { getMpListShort } from "@/utils/util"
import BillPrintIframe from './BillPrintIframe'
import JUpload from '@/components/jeecg/JUpload'
import Vue from 'vue'
export default {
name: 'BillDetail',
components: {
BillPrintIframe,
JUpload
},
data () {
@@ -855,6 +859,7 @@
visible: false,
model: {},
billType: '',
billPrintFlag: false,
fileList: [],
tableWidth: {
'width': '1550px'
@@ -1095,6 +1100,13 @@
created () {
},
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) {
this.billType = type
//附件下载
@@ -1111,6 +1123,7 @@
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params);
this.initPlatform()
},
requestSubTableData(url, params, success) {
this.loading = true
@@ -1138,6 +1151,11 @@
this.title = res.data.subType + type + "-详情";
}
})
},
//三联打印预览
handlePrint() {
this.$refs.modalDetail.show(this.model, this.billType);
this.$refs.modalDetail.title=this.billType + "-三联打印预览";
}
}
}

View 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>

View File

@@ -23,7 +23,7 @@
</template>
<script>
import pick from 'lodash.pick'
import {addPerson,editPerson,checkPerson } from '@/api/api'
import {getPlatformConfigByKey } from '@/api/api'
import { getAction, postAction } from '../../../api/manage'
export default {
name: "PluginModal",
@@ -66,7 +66,7 @@
getAction("/plugin/getMacWithSecret").then((res)=>{
if(res && res.code == 200) {
this.model.platformKey = res.data
getAction("/platformConfig/getPlatformConfigByKey", {"platformKey": "activation_code"}).then((res)=>{
getPlatformConfigByKey( {"platformKey": "activation_code"}).then((res)=>{
if(res && res.code == 200) {
this.model.platformValue = res.data.platformValue
this.visible = true;